Re:Performance comparison of Functional C++ 11, Java 8, Java...
by alayne on Thursday June 05, 2014 @09:33PM
(#7855743)
Java's performance relative to other commonly used languages is very good. It's basically been at 2-3x slower than C/C++ for quite a while.
[ Parent
| on HN ]
Re:Performance comparison of Functional C++ 11, Java 8, Java...
by cbsmith on Thursday June 05, 2014 @10:14PM
(#7855871)
2-3x slower? I guess it depends on what you're doing. For a lot of code I've dealt with the differences in performance have been factional.
Re:Performance comparison of Functional C++ 11, Java 8, Java...
by coldtea on Friday June 06, 2014 @07:36AM
(#7857277)
This doesn't make much sense, unless:
1) You wrote that code in BOTH Java and C++, optimized both, and compared their running times.
2) Said code was CPU bound. For heavy IO bound code you could even use TCL and get "fractional" differences.
Re:Performance comparison of Functional C++ 11, Java 8, Java...
by mtdewcmu on Thursday June 05, 2014 @10:29PM
(#7855909)
Only computation-heavy code will show a difference. And the disparity is going to vary a lot. Some code will be easy for Java's optimizer and won't give C++ any advantage.
Re:Performance comparison of Functional C++ 11, Java 8, Java...
by cbsmith on Friday June 06, 2014 @12:45AM
(#7856248)
Some will even put C++ at a disadvantage.
Re:Performance comparison of Functional C++ 11, Java 8, Java...
by hatred on Friday June 06, 2014 @10:07AM
(#7857924)
Out of curiosity any such examples ?
Re:Performance comparison of Functional C++ 11, Java 8, Java...
by cbsmith on Friday June 06, 2014 @01:06PM
(#7859092)
Of course there are, and it only takes a few seconds with Google to find them. Here's one: the frannkuch-redux benchmark at http://benchmarksgame.alioth.debian.org/u64q/java.php gives Java a >20% CPU efficiency advantage over C++.
Re:Performance comparison of Functional C++ 11, Java 8, Java...
by igouy on Thursday June 12, 2014 @01:56PM
(#7884959)
That compares a Java program written to use multiple cores with a C++ program not written to use multiple cores; because the C++ programs written to use multiple cores did not compile.
See http://benchmarksgame.alioth.debian.org/u64q/performance.php...