4 ms·
I would recommend to have a look at sorted arrays first. There is an implementation available in Boost: http://www.boost.org/doc/libs/1_52_0/doc/html/container
by shin_lao 14y ago
I would recommend to have a look at sorted arrays first. There is an implementation available in Boost:
http://www.boost.org/doc/libs/1_52_0/doc/html/container/non_standard_containers.html#container.non_standard_containers.flat_xxx http://www.boost.org/doc/libs/1_52_0/doc/html/container/non_...
- cbsmith 14y agoSorted arrays are a common choice that I've seen people go to in lieu of std::set, but a proper B-tree implementation kicks butt compared to a sorted array for performance when mutating data, and actually an unsorted array tends to kick but for small array sizes (<100 elements).