Boost logo

Boost :

Subject: Re: [boost] [review] Heaps
From: Tim Blechmann (tim_at_[hidden])
Date: 2011-06-03 12:28:48

> > also it may be better to remove any notion about `cache line size' or
> > `page size' but replace it with `memory locality', which is a broader
> > term and implies that experimenting with different `objects_per_group<>'
> > may be interesting. although my feeling says me, that the default value
> > of 8 will be the first and the last answer for 99% of all use cases ...
> How would you specify locality? A metafunction on the object size and
> other configuration parameters (page size, cache line width, etc?).

grouping more objects will make the algorithm slower in terms of instructions,
but faster since one will access multiple objects are in adjacent memory regions
... i would simply expose this parameter to the user and encourage
experimentation ...

> I'm won't doubt that you're right about 8 being a good default value,
> but I think you need to empirically demonstrate that the choice is
> right for a variety of reasonable object sizes (say, up to 32 bytes)
> and on both 32b and 64b systems.

i can add some benchmarks for various configurations ...

cheers, tim

Boost list run by bdawes at, gregod at, cpdaniel at, john at