Home » Community » U++ community news and announcements » InVector commited
Re: InVector commited [message #39241 is a reply to message #39240] |
Sun, 03 March 2013 17:41 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
Lance wrote on Sun, 03 March 2013 08:43 | Hi Mirek:
Please briefly explain the tradeoff? I mean, comparing to Vector, does InVector pay some other prices, eg, more memory footprint, for dramatically increased insertion performance?
|
Memory footprint is not dramatically different. What is slower is element retrieval.
Quote: |
What's the situations that we should favor one over another?
|
Obviously, if you are using Insert/Remove at arbitrary position and the Vector has more than 2KB of data, InVector will have faster inserts.
If you are not using Insert (which IMO is still majority of cases), use Vector.
If you need map with range search, you obviously have to use Ordered index/maps.
Mirek
|
|
|
Goto Forum:
Current Time: Wed May 08 07:22:46 CEST 2024
Total time taken to generate the page: 0.02486 seconds
|