Would performance be improved if native code were used in place of Java?
Surprisingly not, it would appear. The Su Doku Solver is suite is written in Java, which, as an interpreted language, one would expect to run more slowly than compiled code written in, say, C++. However, the HotSpot Virtual Machine, which ships with the more recent versions of Java, is able to perform dynamic optimization and will compile commonly-called routines on-the-fly. In order to discover whether performance improvements could be found, I rewrote the key solver routines in C++. To my great surprise, the native code ran more slowly. My belief is that I incurred a performance penalty because I used the STL vector<> class in place of the primitive multi-dimensional arrays used in Java and I am sure that I could improve the performance of the native code if I were to tweak the critical loops – however, the key point is that the Java code must execute at somewhere near to an optimal speed and that the inclusion of a mandatory native library in the distribution would not bring a suffi