Can anyone quantify performance differences between C++ and Java?

前端 未结 13 1659
不知归路
不知归路 2021-01-31 11:33

Java was initially slow before the JIT but today performance is pretty close to C++. I want to know if someone has done measurable performance comparisons between the two langu

13条回答
  •  盖世英雄少女心
    2021-01-31 12:01

    I don't believe anyone can prove that C++ will always be meaningfully faster than Java for the simple fact that you can always revert to JNI to get native speed from Java.

    See, for example, SWT which are the graphical tools built by IBM (I think) meant to replace Swing and give both native performance and look-and-feel.

    I, for one, would prefer the ease of development over speed since I consider minimal development time to be more important than raw application speed, especially when I can still get that speed - I can have both the ease-of-development of Java with speed of compiled languages.

提交回复
热议问题