3 ms·
You can do a pretty good job if you have the whole program. That's the point of class hierarch analysis (CHA) or rapid type analysis (RTA), which unfortunately
by titzer 4y ago
You can do a pretty good job if you have the whole program. That's the point of class hierarch analysis (CHA) or rapid type analysis (RTA), which unfortunately doesn't seem to get used all that much these days. Virgil is an unapologetic whole-program compiler and goes even further with specializing to an initialized heap.
JVMs typically use dynamic class hierarchy analysis that doesn't require runtime profiling, but can require deoptimization on class loading.