title: Running a fastest-algorithm competition
body: <p>I'd like to run competitions like code golf competitions, but the winner would have the fastest algorithm, not the smallest code.</p>
  
  <ul>
  <li>One fair way to measure speed of an algorithm is to use a neutral virtual machine, like Java's JVM.  Is there an easy way to know the total number of JVM instructions executed?  (If the entry uses multiple threads, then the total number of JVM instructions would be summed across all threads.)</li>
  </ul>
  
  <p>For example, the code</p>
  
  <pre><code>public class simple {
      public static int main(String argc[]) {
          int i;
  
          i = 3;
          while (i &gt; 0) {
              i--;
          }
  
      return 0;
      }
  }
  </code></pre>
  
  <p>generates the JVM code  </p>
  
  <pre><code>0:  iconst_3
  1:  istore_1
  2:  iload_1
  3:  ifle    12
  6:  iinc    1, -1
  9:  goto    2
  12: iconst_0
  13: ireturn
  </code></pre>
  
  <p>and it takes (if I've counted correctly) 18 JVM instructions to run.  </p>
  
  <ul>
  <li><p>I would like people to be able to run their entries at home, and to see what the judges would see.  Obviously, if I give the input to the program, the fastest solution would be to spit out the memoized, pre-computed answers.  Is there any way to objectively both let people run programs at home and not see memoized answers?</p></li>
  <li><p>What other issues prevent an informal "fastest code competition" from happening?</p></li>
  </ul>
  
  <p>Thanks!</p>