log(n) amortized growth for containers

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Fri Dec 11 18:21:18 PST 2015


I've been using the same mechanism as jemalloc in SDC's runtime 
and it bucket basically by keeping 2 bits of precision + shift. 
It goes as :

4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, ...

It work quite well in practice.



More information about the Digitalmars-d mailing list