There's a lot of AND-ing of hash codes to determine the segments and
buckets and that's much easier to handle if you have a power of 2 and
can shift bits around.

On 22.08.2008 16:22:05 Peter B. West wrote:
> Jeremias Maerki wrote:
> > Ok, here's the final patch I'd propose to fix the memory leak. I've seen
> > no measurable performance degradation compared to the base revision and
> > no multi-threading problems. The memory leak is fixed and the number of
> > stale references remains low.
> > 
> > Feedback welcome.
> > 
> What happens is SEGMENT_COUNT is not a power of 2? Or, what obliges 
> SEGMENT_COUNT to be a power of 2?
> Peter

Jeremias Maerki

Reply via email to