A Faster Java* than Java?
Looking for a faster Java?
Don Browning performed an interesting "unscientific" performance test of C#, Java, and C++ and subsequently provided the source code.
These were his original results...
Time to find the first 7 magic numbers:
1.4.0 JVM - 8.1 seconds
1.4.2 JVM - 5.2 seconds
1.0.3705 CLR - 3.9 seconds
Good Old C++ - 2.3 seconds
I thought it would be interesting to throw both the C# and Java versions against Alintex Script .NET 1.1 and see the results. Please note that Alintex Script .NET 1.1 has not been publicly released and is not available from the Alintex web site.
Update: Alintex Script isnow available for download
Isn't the result afaster Java than Java?
Time to find the first 7 magic numbers:
Alintex Script 1.1 C#code (1.0.4322 CLR) -3.7 seconds
Alintex Script 1.1Javacode (1.0.4322 CLR) -3.85 seconds
In the screenshots below, I explicitly specify the compile (/c) command line option so that the scripts do not receive any performance advantage from already being in the script cache. I also specify the entry points (/et) because both scripts use a non-standard script entry point.
I added a single line to both scripts, that displays the script elapsed time for interest. Alintex Script provides a ScriptInfo class that can be used within a script to obtain information such as the script start time and elapsed time.
* Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. Visual J# .NET has been developed independently by Microsoft. It is neither endorsed nor approved by Sun Microsystems, Inc.