Subject: Re: [boost] Proposal: Monotonic Containers
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2009-06-11 15:02:02
Christian Schladetsch wrote:
> I do not intend to argue about the difference between cache coherency
> and spatial locality; suffice to say they are related.
Yes, there is the issue of false sharing of data that happens to fall on the same cache line. Depending on how hardware cache coherency is implemented this leads to false cache coherency concerns (and performance loss) when granularity of hardware cache coherency is at the cache line as opposed to the much more expensive word size level. Both these problems, however, are solved by custom allocators such as are provided by TBB and other threading libraries that allocate entire cache lines and/or create separate heaps for each thread to prevent them from needing to serialize on access to static data in the allocator while at the same time preventing false sharing. Neither is a good reason to use montonic containers.
Please compare performance of your container to std containers with a good memory pooling allocator and include system settings with your benchmarks so that we know what you are measuring. Your benchmarks mean nothing to me because I don't know what allocator you are comparing to, but suspect you are comparing to the system allocator, which is clearly a straw man argument.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk