The VM can switch between implementations of the same method. If a function is hot, use an optimized version. There is an initial cost to swapping in the stack frame but long-term savings.