|
|
|
|
|
by swift
3211 days ago
|
|
An even better question is "faster by what metric?". Once it has been running for a while and the JIT has done its work, it can definitely happen that a Java program will outperform an equivalent C++ program because of the JIT's improved knowledge of the whole program and the dynamic execution environment. C++ can gain much of the same benefit with LTO and PGO, but it's definitely not trivial (particularly PGO) and there's not really a slam dunk win for C++. Now if the metric is startup time, that's a different story. (Though I believe there's been a lot of work on hybrid AOT/JIT since I left the world of managed languages, so maybe things are better now.) |
|