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
Generated TASM can often be simplified before it is executed on the VM. Consider for example
push 14
push 15
add
this can be replaced by
push 29
When we resolve addresses of list items and structs, we generate a lot of TASM code that can be simplified this way.
Optimally, everything that can be calculated at compile-time should be. Such that the VM's trace lengths can be minimized. A good place to start would be to implment TASM-constant-folding for these patterns
push a push b add
push a push b mul
push a push b eq
push 0 eq push 0 eq push 0 eq -> push 0 eq
push a push b lt
push a push b and
push a push b xor
push a push b pow
push a push b div
push a log_2_floor
push a invert
push a pop_count
All four XFieldElement-specific instructions
Concretely, this optimization step could be implemented as a method on InnerFunctionTasmCode but other interfaces are possible, too.
The text was updated successfully, but these errors were encountered:
Generated TASM can often be simplified before it is executed on the VM. Consider for example
this can be replaced by
When we resolve addresses of list items and structs, we generate a lot of TASM code that can be simplified this way.
Optimally, everything that can be calculated at compile-time should be. Such that the VM's trace lengths can be minimized. A good place to start would be to implment TASM-constant-folding for these patterns
push a push b add
push a push b mul
push a push b eq
push 0 eq push 0 eq push 0 eq
->push 0 eq
push a push b lt
push a push b and
push a push b xor
push a push b pow
push a push b div
push a log_2_floor
push a invert
push a pop_count
XFieldElement
-specific instructionsConcretely, this optimization step could be implemented as a method on
InnerFunctionTasmCode
but other interfaces are possible, too.The text was updated successfully, but these errors were encountered: