TritonVM / tasm-lib

A collection of functions written in Triton VM assembly (tasm)
Apache License 2.0
11 stars 2 forks source link

New subtraction snippets #58

Open Sword-Smith opened 1 year ago

Sword-Smith commented 1 year ago

For some reason our subtraction snippets have a stack layout of lhs on top of the stack and then rhs below it. In the compiler, we first evaluate the LHS and then the RHS meaning we have to swap the operands prior to calling snippets in this standard-library. Then in the snippets contained here, we swap the operands before multiplying rhs with minus one. That's really inefficient.