Idiomatic java code is actually very 'dynamic' because of heavy use of interface types (which are mapped to concrete types at runtime) so polymorphic inline caching is essential for performance.There are languages such as StandardML and Haskell where the type system is much stronger than Java's and consequently can be optimized better at compile time as all types are known upfront.