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

replaced maps with arrays in counters for optimization #1093

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

V-Staykov
Copy link
Collaborator

The majority of the time used to deduct in counters was used to access and change map values. By replacing the map with an array and constant indexes for the counters, deducting becomes 4 times faster.
Before:
image

After:
image

@cla-bot cla-bot bot added the cla-signed label Sep 3, 2024
@V-Staykov V-Staykov enabled auto-merge (squash) September 3, 2024 09:49
@hexoscott
Copy link
Collaborator

Nice change!

@V-Staykov V-Staykov merged commit 1b31cfa into zkevm Sep 3, 2024
8 of 9 checks passed
@V-Staykov V-Staykov deleted the replace-maps-in-counters branch September 3, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants