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

spike: Memory invalidation inefficiencies #23

Open
clabby opened this issue Sep 25, 2023 · 0 comments
Open

spike: Memory invalidation inefficiencies #23

clabby opened this issue Sep 25, 2023 · 0 comments
Labels
help wanted Extra attention is needed mipsevm Touches the `cannon-mipsevm` crate perf Performance related

Comments

@clabby
Copy link
Collaborator

clabby commented Sep 25, 2023

Overview

Memory in Cannon contains a cache for recently accessed pages, and within those pages a cache for intermediate nodes to reduce the merkleization time. When the page data is invalidated (i.e. it's been changed), the root will need to be recalculated on the next pass.

The program is pretty performant, but merkleization is expensive and takes the most time during each step (w/ proof generation turned on), so it would be great to look into how we can further optimize this codepath to decrease cache misses and redundant recomputation of merkle roots.

Refs:

flamegraph

@clabby clabby added help wanted Extra attention is needed mipsevm Touches the `cannon-mipsevm` crate perf Performance related labels Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed mipsevm Touches the `cannon-mipsevm` crate perf Performance related
Projects
None yet
Development

No branches or pull requests

1 participant