Hacker News new | past | comments | ask | show | jobs | submit login

Static compilers can do PGO as well. In practice though, the benefits of PGO in languages like C or C++ that rely on static dispatch are small enough that most people don't care, except for programs that are extremely performance sensitive (compilers, browsers, AAA games etc) where shaving off a few % can make a difference.

What JVM wins in PGO, it loses in other areas, and the end result is often still much slower.




But if my understanding is correct, PGOs don’t help much with “speculative optimizations” — eg. Java can almost always elide virtual calls when only one actual class is loaded implementing an interface, reverting back to virtual calls on class load.

No matter PGO these and similar examples can’t be done without self-modifying code, while java with JIT is sort of that in a way.




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

Search: