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: optimize benchmarks/fibonacci/handwritten_wat.wat #169

Closed
wants to merge 2 commits into from

Conversation

mooori
Copy link

@mooori mooori commented Dec 20, 2023

Taking inspiration from WASM generated by the Rust compiler (e.g. here), this removes a block and decreases $counter to avoid doing a comparison like $counter == 10000. More details in the comment added to handwritten_wat.wat.

Even though the WAT is simpler, the number of cycles required to executed the generated zkASM does not change. Understanding why there is no reduction of cycles potentially could hint at some optimizations for the generated zkASM.

CC @Akashin as this is part of the investigations carried out for #151.

@mooori
Copy link
Author

mooori commented Dec 20, 2023

Closing as this PR was filed just for reference.

@mooori mooori closed this Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant