|
Boost : |
Subject: Re: [boost] Fastest Data-structure maybe from STL or Boost ..!!
From: StanisÅaw Halik (sthalik_at_[hidden])
Date: 2013-10-09 06:27:53
Rahul Mathur wrote:
> I wish to record 1000 real time data which need to be in sorted order.
> I used STL MAP which sorts using KEYS and than sorted the value using STL
> VECTOR, the complete scenario give me almost 6ms of time analysis. The
> TARGET is to achieve almost 1.5 - 2.0 ms.
> Also, once this data structure is completely filled I want to delete the
> first data and replace it with the new data.
For mere 1k records, recommend multi_index with freshness measure as one
index, and second index on extracted key.
Don't recommend optimizing for the non-bottleneck, either. Can be replaced
with something more involved once it's known to be the limiting case.
-sh
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk