- This allows an adaptive optimizer to make risky assumptions about the code.
- An adaptive optimizer would compile assembly code to optimize for this common case.
- With a simple implementation, an adaptive optimizer may simply make a trade-off between just-in-time compilation and interpreting instructions.
- When these assumptions prove incorrect, the adaptive optimizer can'unwind'to a valid state and then interpret the byte code instructions correctly.
- If the system then started processing tens of thousands of deposits instead, the adaptive optimizer would recompile the assembly code to optimize the new common case.