6 ms·
Depends on how much effort, like on C and C++, you are willing to put into PGO metadata for the compiler and linker.
by pjmlp 6d ago
Depends on how much effort, like on C and C++, you are willing to put into PGO metadata for the compiler and linker.
- samus 5d agoEven if you can gather that PGO metadata a running application won't be able to adapt to changes in that data.
- pjmlp 5d agoIt works well enough for systems software written in C and C++, where Java still remains a niche option, even when it could deliver.
- samus 4d agoJava has many dynamic features where runtime optimization is required to remove the overhead. Virtual method calls are opt-out instead of opt-in, and there is an open world assumption. The possibility of doing stack allocation of objects depends on the call hierarchy (in the future it will get a bit easier with value objects). Also, C/C++ are not managed languages, therefore the effects of bad optimization don't hurt as much.
- pjmlp 3d agoDepends on how many dynamic libraries or OOP features get used, or the C++ frameworks inspired by Smalltalk that predated Java by a decade.