I'm working on a Sudoku solver at school and we're having a little performance contest. Right now, my algorithm is pretty fast on the first run (about 2.5ms), but even faster when I solve the same puzzle 10 000 times (about 0.5ms for each run). Those timing, of course, depend of the puzzle being solved. I know the JVM do some optimization when a method is called multiple time, and this is what I suspect is happening.
I don't think I can further optimize the algorithm itself (though I'll keep looking), so I was wondering if I could replicate some of the optimizations done by the JVM.
Note : compiling to native code is not an option
Thanks!
Edit : All those VM options are nice, but are not really "legal" in an algorithm contest, since everyone could use those options and get the performance boost. I'm looking for code optimization.