logoalt Hacker News

meisel12/09/20240 repliesview on HN

It could be improved even more, performance wise. The potentially expensive modulo could be avoided entirely with an if statement. Or, only use powers of 2 for the capacity, and then you can also use bit wise ops