3 ms·
>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
by xxs 6y ago
>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.