Performance of Java 1.6 vs C++?

前端 未结 8 1000
天涯浪人
天涯浪人 2021-01-07 06:04

With Java 1.6 out can we say that performance of Java 1.6 is almost equivalent to C++ code or still there is lot to improve on performance front in Java compared to C++ ?

8条回答
  •  旧巷少年郎
    2021-01-07 06:20

    What program are you developing?

    Comparing C++ to Java speed is like comparing a screwdriver and a hammer, pointless. In the world we live in, where both supercomputers and toasters need to be programmed, you need to focus on your particular requirements.

    I use C++ for hard realtime software running on embedded systems. I wouldn't dream of using the awfully broken Java for realtime spec for at least another 5 years, when it will hopefully be mature. I would be equally loath to use C++ for a database, cloud accessing middleware app (actually I have no Idea what I just said, but I know Java is good for 'that sort of stuff')

    Would you use a ferrari with no trunk space to move your belongings? Would you bring a minivan to a drag race?

    People have to understand that just because they are programming languages, does not mean they are comparable in a meaningful way.

提交回复
热议问题