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

> IMO it is a questionable decision to spend CPU resources on randomization …

It takes about 3 ns to choose a random starting bucket, which is basically free relative to the iteration itself.



Isn't the trick that the runtime picks another hash-constant every time?


Aside from keying the hash function, Go specifically randomises the start offset of each map iteration.




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

Search: