triton-vm
triton-vm copied to clipboard
Drop instruction `recurse`
Even though it is a beautiful instruction, dropping recurse might lead to a simpler design and better overall performance.
Pro recurse
- proper tail recursion, i.e., no new entry to the jump stack
Contra recurse
- requires columns “jump destination”
jsdin both the Processor Table and the Jump Stack Table - (slight) complexity increase in the AIR to take proper care of
jsd, also in both tables - instruction deselectors for the Processor Table might have higher degree[^deselect]
[^deselect]: Since instructions are deselected based on the decomposition of their opcode, the corresponding deselectors do probably not change in degree when dropping recurse.
recurse delivers some convenience wrt. not pushing the same jump address to the stack repeatedly, since call-return pops it. Let's assess this removal when we write a big enough program to understand the cost of the inconvenience. It may be that it's not worth its own constraint polynomials.
This is stale – closing.