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
You see the consecutive ILOAD(0), ILOAD(0) which is much faster as ILOAD(0), DUP. A simple peephole optimizer in the back-end, written as a ASM visitor wrapper could do the trick.
The text was updated successfully, but these errors were encountered:
I know. Unfortunately I have not made an intermediate step between flybytes asts and the ASM library on the way to bytecode. The reason is performance of the compiler. I think the disassembled example made you think otherwise. Got ya! 😇
On the way back I did use the above data type for bytecode instructions, because I really needed list matching for the decompiler and because some people only need a disassembler.
So we would have to implement the peephole optimizer against the ASM library.
If you look at what we generate for the FuncFactorial demo:
You see the consecutive
ILOAD(0), ILOAD(0)
which is much faster asILOAD(0), DUP
. A simple peephole optimizer in the back-end, written as a ASM visitor wrapper could do the trick.The text was updated successfully, but these errors were encountered: