
17 Jul
2012
17 Jul
'12
8:15 a.m.
On Tuesday, July 17, 2012 03:13 PM, Amir Ansari wrote:
Hi,
In my work I have repeatedly had the need to create a sorted array in which I can insert/lookup from using a key. This is like a map except that it uses an array. The contention is that in some cases, it is faster to insert/remove from a sorted array rather than traversing a tree (the underlying data structure for a map) which involves pointer de-referencing. I would like to call the class linear_map. Looking forward to feedback from everyone.
Does it differ from boost::flat_map: http://www.boost.org/doc/libs/1_50_0/doc/html/boost/container/flat_map.html Ben