Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

characterizing what the performance difference between C++ and Java is or will normally be is really hard.

Naive translations from Java to C++ will normally result in only a small % difference.

But clever rewrites where control of memory locality is leveraged, and SIMD intrinsics are leveraged (either via pragmas to induce it automatically, or by hand), good understanding of compiler settings for given architectures, etc, the differences can get quite large, depending on the problem domain.

Then again, there are ways around some of the performance limitations in the JVM, but it often involves writing very painful coding styles. But you could narrow the gap a bit with that effort. (but if you are going to add effort, maybe just do it is in C++?)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: