Tag: shift

  • Why 31

    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.