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

fix: uninitialized_memory hashmap issue #1536

Merged
merged 3 commits into from
Sep 24, 2024
Merged

Conversation

ctian1
Copy link
Member

@ctian1 ctian1 commented Sep 23, 2024

With programs with huge amounts of input data, ExecutionState.uninitialized_memory could slow the execution down significantly due to hash collisions

Copy link

github-actions bot commented Sep 23, 2024

SP1 Performance Test Results

Branch: chris/runtime-execute-fix-dev
Commit: b4dd6864
Author: ctian1

program cycles execute (mHz) core (kHZ) compress (KHz) time success
fibonacci 11291 0.18 5.61 0.15 1m17s
ssz-withdrawals 2757356 17.19 57.79 15.98 2m53s
tendermint 12593597 6.65 155.11 58.74 3m36s

@@ -185,6 +185,14 @@ impl<'a, V> Entry<'a, V> {
Entry::Occupied(entry) => entry.into_mut(),
}
}

pub fn and_modify<F: FnOnce(&mut V)>(mut self, f: F) -> Self {
Copy link
Member

Choose a reason for hiding this comment

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

nit: Add doc comment for this fn, similar to other 2

Copy link
Member

@ratankaliani ratankaliani left a comment

Choose a reason for hiding this comment

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

Small doc comment, otherwise LGTM

@ctian1 ctian1 merged commit fca5db0 into dev Sep 24, 2024
6 checks passed
@ctian1 ctian1 deleted the chris/runtime-execute-fix-dev branch September 24, 2024 21:13
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.

2 participants