Why 31

A nice property of 31 is that the multiplication can be replaced by a shift and a subtraction for better performance: 31 * i == (i << 5) – i. 


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *