You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dynjit inherits the identical semantics from python bytecode, which is using GET_ITER and FOR_ITER to implement loops:
foriinxs:
# do some
under dynjit, it is identical to
tmp=iter(xs)
whileTrue:
try:
i=next(iter)
exceptStopIteration:
gotol:
# do somel:
The key point is, finding a protocol for, switching from pure Python code to optimized code when the types of iter and i got known.
Question: Should we follow the Python loop implementation, i.e., using __iter__? If so, exception check makes it impossible to make a positive enough performance gain. Even if __iter__ is jitted, exception check is still a disaster.
The text was updated successfully, but these errors were encountered:
This have to been deferred until we implement bytecode -> untyped DIO IR transformation.
I don't believe this is the most urgent.
Efforts will be allocated for supporting JITing the most builtins and language features already allowed in DIO-JIT.
Dynjit inherits the identical semantics from python bytecode, which is using
GET_ITER
andFOR_ITER
to implement loops:under dynjit, it is identical to
The key point is, finding a protocol for, switching from pure Python code to optimized code when the types of
iter
andi
got known.Question: Should we follow the Python loop implementation, i.e., using
__iter__
? If so, exception check makes it impossible to make a positive enough performance gain. Even if__iter__
is jitted, exception check is still a disaster.The text was updated successfully, but these errors were encountered: