@@ -0,0 +1,995 @@
+%0Aimport java.util.*;%0A%0Apublic class Mods %7B %0A  public static void main(final String%5B%5D ARGV) %7B %0A    final int size  = (int) Math.pow(2,10);%0A    final int mask  = size -1;%0A    final int counter = 1934;%0A%0A    final List%3CInteger%3E l = new ArrayList%3CInteger%3E(size);%0A    for(int i = size; --i %3E=0;) %7B l.add(null);%7D%0A%0A%0A    for (int c = 100 ; --c %3E=0;)%7B%0A      final long startMod = new java.util.Date().getTime();%0A      for (int i = 10000; --i %3E=0;) %7B %0A        l.set(mo(i, size), i);%0A      %7D%0A      System.out.println(%22Mod took %22 + (new java.util.Date().getTime() - startMod));%0A  %0A      final long startMask = new java.util.Date().getTime();%0A      for (int i = 10000; --i %3E=0;) %7B %0A        l.set(mo(i, mask), i);%0A      %7D%0A      System.out.println(%22mask took %22 + (new java.util.Date().getTime() - startMask));%0A    %7D%0A%0A%0A  %7D%0A%0A  static public int mo(final int counter , final int size)%7B%0A    return counter %25 size;%0A  %7D%0A    %0A  static public int ma(final int counter, final int mask) %7B%0A    return counter & mask;%0A  %7D%0A%7D%0A

add JIT example