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

[Execution state] Optimize MTrie reading a single path #1876

Closed
fxamacker opened this issue Jan 20, 2022 · 0 comments · Fixed by #2473
Closed

[Execution state] Optimize MTrie reading a single path #1876

fxamacker opened this issue Jan 20, 2022 · 0 comments · Fixed by #2473
Assignees
Labels
Execution Cadence Execution Team Performance

Comments

@fxamacker
Copy link
Member

fxamacker commented Jan 20, 2022

Problem

Currently, MTrie.UnsafeRead reads registers in batch, so a read for a single path goes through the unnecessary steps of path partitioning and recursive calls.

Updates epic #1744 because optimization would also improve memory use.

The Proposed Solution

Create a new read function to read register for a single path. Existing read function can use the new read function to skip unnecessary steps when len(paths) == 1.

delta.View can also be optimized by using this new read function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Execution Cadence Execution Team Performance
Projects
None yet
2 participants