Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
benibela
on April 25, 2020
|
parent
|
context
|
favorite
| on:
Which is better on Android: divide by 2 or shift b...
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:
So they could do "x = (x + 1) & (limit - 1)". No division and branch free.