triton-vm icon indicating copy to clipboard operation
triton-vm copied to clipboard

Drop instruction `recurse`

Open jan-ferdinand opened this issue 2 years ago • 1 comments

Even though it is a beautiful instruction, dropping recurse might lead to a simpler design and better overall performance.

Pro recurse

Contra recurse

  • requires columns “jump destination” jsd in 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.

jan-ferdinand avatar Oct 13 '22 05:10 jan-ferdinand

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.

sshine avatar Oct 13 '22 06:10 sshine

This is stale – closing.

jan-ferdinand avatar Jan 12 '23 15:01 jan-ferdinand