Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I just benchmarked a bunch of hashmaps, and the fastest maps were using a power of 2 as size.

So they could do "x = (x + 1) & (limit - 1)". No division and branch free.



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

Search: