Collections versus std::map
I'm looking for a fast sparse array that permits ordered traversal of the occupied slots. std::map is much too slow. boost multi-index with a sequenced index on an unsigned int is significantly slower even that the std::map, which isn't too surprising given the writeup. Is there something else in boost that fills this space?
2008/10/16 Benson Margulies
I'm looking for a fast sparse array that permits ordered traversal of the occupied slots. std::map is much too slow. boost multi-index with a sequenced index on an unsigned int is significantly slower even that the std::map, which isn't too surprising given the writeup. Is there something else in boost that fills this space?
Boost.uBLAS has sparse vectors. http://www.boost.org/doc/libs/1_36_0/libs/numeric/ublas/doc/vector_sparse.ht... Roman.
I'm looking at this, and I'm a little bit confused.
Does the mapped_vector iterator visit only the occupied slots, or all
the virtual zeros? If the former, how do I ask it where it is? If the
later, how would I efficiently do the former?
On Thu, Oct 16, 2008 at 4:17 AM, Roman Perepelitsa
2008/10/16 Benson Margulies
I'm looking for a fast sparse array that permits ordered traversal of the occupied slots. std::map is much too slow. boost multi-index with a sequenced index on an unsigned int is significantly slower even that the std::map, which isn't too surprising given the writeup. Is there something else in boost that fills this space?
Boost.uBLAS has sparse vectors. http://www.boost.org/doc/libs/1_36_0/libs/numeric/ublas/doc/vector_sparse.ht...
Roman.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I've made some progress here, and I'd like to replace my previous question with two new ones: 1) The value type for the mapped_vector must construct over int to allow value_type(0). Howcome? What's wrong with a no-args constructor? 2) I am trying to replace some code that said: my_value_type* p = &container[index] = another_value; I keep getting stuck on various intermediate types. Is there a recipe for this?
participants (2)
-
Benson Margulies
-
Roman Perepelitsa