Guard and Deoptimisation
May 30, 2026 | 5 min read
Type Guards
Inline checks verify that variables still have expected types.
Guard Failure
If a type changes, execution jumps to the CPython interpreter.
Deoptimisation
The compiled function is marked deoptimised and may be recompiled with updated type info.
Monitoring
Deoptimisation counts are recorded in usage events.