Friday, February 1, 2008

Java is more then twice faster then C++ in real life benchmark

Atlas uses Octopus to convert its geometry database from Oracle to SQLite. Octopus is written in 100% Java, as well as MySQL JDBC driver. Until recently, we were using native C++ implementation of SQLite, interfaced with Octopus via JNI. We have now migrated into 100% Java implementation of SQLite. This implementation has been created automaticaly using NestedVM tool. NestedVM converts MIPS binary (result of GCC compilation) code into Java classfiles. This way, any language, which can be compiled by GCC, can be translated into Java. Resulting Java is supposed to be quite slower as original code (or equivalent code written directly in java) because it contains only very low-level language constructs (quite close to assembler).

What was our surprise, when we have found that new 100% Java implementation is more then twice faster than previous mixed Java-C++ implementation. We get that speed-up on top of usual advantages of Java: platform independence (we just need one distribution, which runs on every platform, 32 or 64 bit based), exact reproducibility of results and order-of-magnitude smaller executable.

No comments:

Post a Comment