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 MemBefore initial size #684

Merged
merged 11 commits into from
Oct 10, 2024
Merged

Conversation

Nashtare
Copy link
Collaborator

@Nashtare Nashtare commented Oct 1, 2024

Reduce KERNEL size to allow initial MemBefore to fit in 2^16 rows (currently padded to 2^17).
Also address the TODO on gas_hook, as we haven't had any gas discrepancies since full completion of the Ethereum test suite, and this is saving a couple hundred thousand cycles for mainnet blocks (while also reducing KERNEL code size).

Most of the savings are around removing the heavy PUSHes (for large values), and reordering stack elements.

Current KERNEL code size as of 3a220c1:

  • eth_mainnet: 64559
  • cdk_erigon: 63858 (though this will probably go over the limit again once plugging the smt code)

Ran through the Ethereum test suite for consistency

@Nashtare Nashtare added this to the Performance Tuning milestone Oct 1, 2024
@Nashtare Nashtare self-assigned this Oct 1, 2024
@github-actions github-actions bot added the crate: evm_arithmetization Anything related to the evm_arithmetization crate. label Oct 1, 2024
Copy link
Contributor

@LindaGuiga LindaGuiga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me, thanks! Just a couple of nits

Copy link
Contributor

@hratoanina hratoanina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Nashtare Nashtare merged commit e859d84 into develop Oct 10, 2024
20 checks passed
@Nashtare Nashtare deleted the perf/reduce_mem_before branch October 10, 2024 11:58
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.

3 participants