Boost logo

Boost :

Subject: Re: [boost] [Intrusive]
From: Soul Studios (matt_at_[hidden])
Date: 2017-08-27 00:33:38


>>> Whether that is faster or not depends on many factors, primarilly the
>>> use scenarios at hand. One can't make a general statement like that
>>> without specifics. One factor that could make a vector more efficient
>>> than a list is cache friendliness, but an intrusive list could
>>> exploit it as well if you manage the storage appropriately.
>>
>> Examples please.
>
> Examples of what, exactly?

Of scenarios where what you're saying is true. My benchmarks indicate
that a list which allocates in chunks rather than individually only
outperforms a vector of indexes to a vector of elements in the case
where ordered insertion is very frequent (plf::list is the list in
question: see
http://www.plflib.org/benchmarks_haswell_gcc.htm#orderedlowmodification
and
http://www.plflib.org/benchmarks_haswell_gcc.htm#orderedhighmodification
and http://www.plflib.org/benchmarks_haswell_gcc.htm#highmodification)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk