-
-
Notifications
You must be signed in to change notification settings - Fork 161
Open
Labels
Description
Python 3.10 removes the jump by duplicating some instructions at the loop's start. This way, there's only 1 jump when the loop exits, instead of 2 (to head then out). And for every loop iteration, there's one less instruction to run, which is JUMP_ABSOLUTE
from cyberbrain import trace
@trace
def run_while():
i = 0
while i < 2:
a = i
i += 1
run_while()