About global lookup caches @Nahuel Palumbo I think we should take a good look at these FIVE papers - Surgical precision JIT compilers [PLDI'14] https://dl.acm.org/doi/10.1145/2666356.2594316 - Efficient late binding of dynamic function compositions https://dl.acm.org/doi/10.1145/3357766.3359543 - Making collection operations optimal with aggressive JIT compilation https://dl.acm.org/doi/10.1145/3136000.3136002 - Dynamic versus Static Optimization Techniques for Object-Oriented Languages https://onlinelibrary.wiley.com/doi/10.1002/j.1096-9942.1995.tb00017.x - A Survey of Adaptive Optimization in Virtual Machines https://ieeexplore.ieee.org/document/1386662