Monday, March 12, 2007

C++ vs Java vs .NET
on Solaris & Windows

It's article shows performance test results for following environments:
  • C++ (Visual Studio 2005/VC 8.0)/ Windows 2003/ Intel P4 2GHz 1Gb RAM
  • C++ (gcc 3.3.4 +STLport 4.5.3) / Sun Solaris 10 / Sun Fire v210 (2x1.34 GHz UltraSPARC) 4Gb RAM
  • C++ (Visual Studio 2005/VC 8.0)/ Windows XP/ Intel Core 2 Duo E6300 (1,8 Ghz) 1Gb RAM
  • Java (JDK 1.6) / Windows 2003 / Intel P4 2GHz 1Gb RAM
  • Java (JDK 1.6) / Sun Solaris 10 / Sun Fire v210 (2x1.34 GHz UltraSPARC) 4Gb RAM
  • Java (JDK 1.6) / Windows XP/ Intel Core 2 Duo E6300 (1,8 Ghz) 1Gb RAM
  • C# (.NET 2.0) / Windows XP/ Intel Core 2 Duo E6300 (1,8 Ghz) 1Gb RAM
Overview

All tests specified values as time execution in seconds (with milliseconds) and smaller value is the better result.
It's a primitive single-thread test. The multi-thread test is work for me in future.
Java always ran in server VM mode (-server param).

Test source code :
You can get test result table from here

Result diagrams:

1. Objects creation test
2. Call virtual method with string (for C++ uses STL string) arguments and result

(Diagram will be publish later and not available now - please read table results)

3. Call a non-virtual usual method with string (for C++ uses STL string) arguments and result

(Diagram will be publish later and not available now - please read table results)

4. Network performance test for sockets (TCP/IP). Blocking mode with packet size 256 & 10000 iteration


5. Network performance test for sockets (TCP/IP). Blocking mode with packet size 256 & 100000 iteration


6. Call a virtual method with long arguments and result


7. Call a non-virtual method with long arguments and result

No comments:

Post a Comment