Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Linear-Log Bucketing: Fast, Versatile, Simple (pvk.ca)
43 points by luu on June 28, 2015 | hide | past | favorite | 8 comments


I wish that I knew the name, but this reminds me of the banknote sequence 1 2 5 10 20 50 100 ...


Hyperinflation sequence for banknotes:

http://oeis.org/A051109


This sounds like what the TLSF allocator does: http://www.gii.upv.es/tlsf/main/docs


Is it just me, or are the bin sizes listed from jemalloc (assuming 150 should be 160, and 182 be 192) not dividing each power-of-2 range linearly?

16, 32, 48, 64, 80, 96, 128, 160, 192, 256, 320, 384, …

It looks like, from 64 and up, each power-of-2 range is divided into two quarter ranges and one half range.


That's just bad mental arithmetic on my part. Fixed!


I think you now subbed 102 for 192 "128, 160, 102, 224". Sorry to nitpick, but I stared at that for longer than I'd really like to admit before thinking it was a typo.


Fixed, thank you!


I believe memcached uses a similar algorithm for storing objects in its heap space. It's a nice way to strike a balance between waste and speed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: