Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: Reduce KERNEL / MemBefore size #669

Closed
wants to merge 3 commits into from
Closed

Conversation

Nashtare
Copy link
Collaborator

@Nashtare Nashtare commented Sep 27, 2024

More could be done here and there, but this is sufficient to bring all KERNEL variants' lengths down under 65536 with some margin, so that initial MemBefore table of all segment batches is padded to a smaller power of 2.

Mostly revolves around:

  • replacing large subsequent PUSH @CONSTANT with DUP
  • improving some hot macros / loops

Note that we are considering adding some INCR / DECR privileged instruction, which would increase the KERNEL code length safety margin in case of future increase.

@Nashtare Nashtare added this to the Performance Tuning milestone Sep 27, 2024
@github-actions github-actions bot added the crate: evm_arithmetization Anything related to the evm_arithmetization crate. label Sep 27, 2024
@Nashtare
Copy link
Collaborator Author

Had to revert snarkv precompile initialization of calldata, which made it go over the limit again. Will reopen once additional gains are brought in.

@Nashtare Nashtare closed this Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: evm_arithmetization Anything related to the evm_arithmetization crate.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant