Skip to content

Optimize POP and RETURN opcode codegen #36

@tcrypt25519

Description

@tcrypt25519

Two stack operations in crates/jet/src/builder/ops.rs go through heavier paths than necessary:

  • ops.rs:687POP: Calls the full stack_pop_1 helper even though the popped value is discarded. We could simply decrement the stack pointer.
  • ops.rs:792RETURN: Loads offset/size from the stack then stores them back into the return registers. Could be a direct copy skipping the intermediate load.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions