tag:blogger.com,1999:blog-22079548.post-68952324426939644252007-03-13T00:02:00.000+03:002007-03-13T13:33:45.350+03:002007-03-13T13:33:45.350+03:00<div style="text-align: center;"><span style="font-weight: bold;"><span style="font-size:180%;"><span style="color: rgb(255, 0, 0);">C++</span></span> vs <span style="font-size:180%;"><span style="color: rgb(51, 51, 255);">Java</span></span> vs <span style="font-size:180%;"><span style="color: rgb(0, 153, 0);">.NET </span></span></span><br /><span style="font-weight: bold;"><span style="font-size:180%;"><span style="color: rgb(0, 153, 0);"><span style="font-size:100%;"><span style="color: rgb(0, 0, 0);">on <span style="color: rgb(51, 51, 255);font-size:130%;" >Solaris</span> & <span style="font-size:130%;"><span style="color: rgb(102, 102, 204);">Windows<br /></span></span></span></span></span></span></span><div style="text-align: left;"><span style="font-weight: bold;"><span style="font-size:100%;"><br />It's article shows performance test results for following environments:<br /></span></span><ul><li>C++ (Visual Studio 2005/VC 8.0)/ Windows 2003/ Intel P4 2GHz 1Gb RAM</li><li>C++ (gcc 3.3.4 +STLport 4.5.3) / Sun Solaris 10 / Sun Fire v210 (2x1.34 GHz UltraSPARC) 4Gb RAM</li><li>C++ (Visual Studio 2005/VC 8.0)/ Windows XP/ Intel Core 2 Duo E6300 (1,8 Ghz) 1Gb RAM </li><li>Java (JDK 1.6) / Windows 2003 / Intel P4 2GHz 1Gb RAM</li><li>Java (JDK 1.6) / Sun Solaris 10 / Sun Fire v210 (2x1.34 GHz UltraSPARC) 4Gb RAM</li><li>Java (JDK 1.6) / Windows XP/ Intel Core 2 Duo E6300 (1,8 Ghz) 1Gb RAM<br /></li><li>C# (.NET 2.0) / Windows XP/ Intel Core 2 Duo E6300 (1,8 Ghz) 1Gb RAM</li></ul><span style="font-weight: bold;">Overview</span><br /><br />All tests specified values as <span style="font-style: italic;">time execution in seconds (with milliseconds)</span> and smaller value is the better result.<br />It's a primitive single-thread test. The multi-thread test is work for me in future.<br />Java always ran in server VM mode (-server param).<br /><br /><span style="font-weight: bold;">Test source code :</span><br /><ul><li><a href="http://docs.google.com/Doc?id=dgf4f36d_9s86x7r">C++ source</a></li><li><a href="http://docs.google.com/Doc?id=dgf4f36d_10gsk5fb">Java source</a></li><li><a href="http://docs.google.com/Doc?id=dgf4f36d_119dk2gh">.NET source</a></li><li><a href="http://docs.google.com/Doc?id=dgf4f36d_12hn9pbh">EchoServer source (C++ only)</a> for network performance test<br /></li></ul>You can get test result table <a href="http://spreadsheets.google.com/pub?key=p1418WBHaq5bwzfiymzf7Eg">from here</a><br /></div><div style="text-align: left;"><br /><span style="font-weight: bold;">Result diagrams:<br /><br /></span><span><span style="font-size:85%;">1. Objects creation test</span></span><span style="font-weight: bold;"><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_SGffpHUDp6A/RfXKmsCH6VI/AAAAAAAAAPA/pGyCvUJuA-U/s1600-h/1.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_SGffpHUDp6A/RfXKmsCH6VI/AAAAAAAAAPA/pGyCvUJuA-U/s320/1.JPG" alt="" id="BLOGGER_PHOTO_ID_5041158123915045202" border="0" /></a><span><span style="font-size:85%;">2. Call virtual method with string (for C++ uses STL string) arguments and result</span></span><br /><br /><span style="font-size:78%;"><span style="font-style: italic;">(Diagram will be publish later and not available now - please read table results)</span></span><br /><br /><span style="font-weight: bold;"><span style="font-size:180%;"><span style="color: rgb(0, 153, 0);"><span style="font-size:100%;"><span style="color: rgb(0, 0, 0);"><span style="font-size:130%;"><span style="color: rgb(102, 102, 204);"></span></span></span></span></span></span></span></div><div style="text-align: left;"><span><span style="font-size:85%;">3. Call a non-virtual usual method with string (</span></span><span><span style="font-size:85%;">for C++ uses STL string</span></span><span><span style="font-size:85%;">) arguments and result<br /><br /></span></span></div><div style="text-align: left;"><span style="font-size:78%;"><span style="font-style: italic;">(Diagram will be publish later and not available now - please read table results)<br /><br /></span></span><span><span style="font-size:85%;">4. Network performance test for sockets (TCP/IP). Blocking mode with packet size 256 & 10000 iteration<br /></span></span></div><br /><div style="text-align: left;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_SGffpHUDp6A/RfXLPMCH6bI/AAAAAAAAAPw/oxcnrEOIgy4/s1600-h/7.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_SGffpHUDp6A/RfXLPMCH6bI/AAAAAAAAAPw/oxcnrEOIgy4/s320/7.JPG" alt="" id="BLOGGER_PHOTO_ID_5041158819699747250" border="0" /></a><br /><span><span style="font-size:85%;">5. Network performance test for sockets (TCP/IP). Blocking mode with packet size 256 & 100000 iteration</span></span></div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_SGffpHUDp6A/RfXLLcCH6aI/AAAAAAAAAPo/GcBgAkL-8ww/s1600-h/6.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_SGffpHUDp6A/RfXLLcCH6aI/AAAAAAAAAPo/GcBgAkL-8ww/s320/6.JPG" alt="" id="BLOGGER_PHOTO_ID_5041158755275237794" border="0" /></a><br /><div style="text-align: left;"><span><span style="font-size:85%;">6. </span></span><span><span style="font-size:85%;">Call a virtual method with long arguments and result</span></span><br /></div><br /><div style="text-align: left;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_SGffpHUDp6A/RfXLIMCH6ZI/AAAAAAAAAPg/uptMOGnTSkE/s1600-h/5.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_SGffpHUDp6A/RfXLIMCH6ZI/AAAAAAAAAPg/uptMOGnTSkE/s320/5.JPG" alt="" id="BLOGGER_PHOTO_ID_5041158699440662930" border="0" /></a><br /><span><span style="font-size:85%;">7. </span></span><span><span style="font-size:85%;">Call a non-virtual method with long arguments and result<br /><br /></span></span></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_SGffpHUDp6A/RfXLEMCH6YI/AAAAAAAAAPY/reL14q6Q8X8/s1600-h/4.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_SGffpHUDp6A/RfXLEMCH6YI/AAAAAAAAAPY/reL14q6Q8X8/s320/4.JPG" alt="" id="BLOGGER_PHOTO_ID_5041158630721186178" border="0" /></a></div>akira_aghttp://www.blogger.com/profile/04917992368878353596noreply@blogger.com0