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

>on array offsets? How often you do it?

Every =single= hash map worth its salt should be power of 2 length backed array. And the hashing function (for the idx of the array) is not the division (that's slow and cannot be parallelized in the cpu) but a simple bitwise AND.

In short offset 1 doesn't map well to hardware.



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

Search: