3 ms·
There really isn't much difference when comparing code that does the same thing in roughly the same way. As you noticed, you can even get some performance freeb
by EpicEng 12y ago
There really isn't much difference when comparing code that does the same thing in roughly the same way. As you noticed, you can even get some performance freebies in managed world for a variety of reasons. However, that's not the point. You can tune your C or C++ to a much higher degree than you can managed code, and that's where they win.
- threeseed 12y agoThis has been covered ad naueseum. There are plenty of situations where both the C/C++ and Java sides of the fence will beat each other in benchmarks. Especially if you have average developers programming both platforms.
- EpicEng 12y agoYes, that "average developers" part is the important bit. Not sure what your point is here. The parent was talking about their experience in porting C++ code to Java, noting a performance improvement. In terms of performance, you don't use a language like C++ because it is going to be faster than everything else out there in all cases, you use it because you can eek out more performance than you can in using a language such as Java.
- bwanab 12y agoMy point was that the C++ version had been tuned over several years to get as much performance as it could. Replicating the C++ code in java wasn't the optimal strategy for performance in java, but it was the optimal strategy for getting the correct results. There are many optimizations I could have gotten by rewriting the java code in a manner that took better advantage of java's strengths, but alas the project is in other hands now....