So much about statements on stackoverflow like
hash 5 - hashis the same as
hash * 31 + charbut a LOT faster.
In times of interpreted languages and virtual machines one should reconsider before applying the same old rules again.
p.s. If you know about alternative algorithms/implementations, please add them to the test and leave a comment here, I’m curious to see what else there is. Btw. I was very surprised that the neat reduce-based version failed so miserably.