Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

Cross that bridge when you get there. If you're really finding that your hash function is the slowest piece of code in a tightly bound for-loop, and it's not all the collisions you're having (from having a bad hashing function), then look into alternatives. Before that, you're doing premature optimization.


Please read the whole thread before replying with the "premature optimization" thing. We are talking about hash table optimizations; this commenter -- https://hackernews.hn/item?id=4037320 -- is asking about the cost of modulo operation.




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

Search: