2 ms·
There are inline caches (IC) and JVM uses that to a point. The inline caching for hotspot is 2 targets with guard checks[0] and then a polymorphic call. However
by xxs 8y ago
There are inline caches (IC) and JVM uses that to a point. The inline caching for hotspot is 2 targets with guard checks[0] and then a polymorphic call. However if there are no dominating/common calls the IC is useless.
On top of that JVM has an inline budget and just stops at a point. So the switch stuff ain't happening for megamorph.
[0]:https://blog.h2o.ai/2010/04/inline-caches-and-call-site-optimization/ https://blog.h2o.ai/2010/04/inline-caches-and-call-site-opti...