-
Notifications
You must be signed in to change notification settings - Fork 84
fix: keep track of memory accesses since last checkpoint #2332
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
Conversation
This comment has been minimized.
This comment has been minimized.
CodSpeed Performance ReportMerging #2332 will degrade performance by 79.78%Comparing
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | benchmark_execute_metered[quicksort] |
9.1 ms | 44.8 ms | -79.78% |
| ❌ | WallTime | benchmark_execute_metered[keccak256] |
11.1 ms | 46.8 ms | -76.25% |
| ❌ | WallTime | benchmark_execute_metered[fibonacci_iterative] |
14.3 ms | 49.1 ms | -70.92% |
| ❌ | WallTime | benchmark_execute_metered[bubblesort] |
11.2 ms | 46.7 ms | -75.9% |
| ❌ | WallTime | benchmark_execute_metered[revm_transfer] |
23.9 ms | 59.1 ms | -59.47% |
| ❌ | WallTime | benchmark_execute_metered[sha256] |
9.3 ms | 45 ms | -79.4% |
| ❌ | WallTime | benchmark_execute_metered[revm_snailtracer] |
10 ms | 42.2 ms | -76.37% |
| ❌ | WallTime | benchmark_execute_metered[fibonacci_recursive] |
16.8 ms | 52.7 ms | -68.12% |
Footnotes
-
36 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
8b1f528 to
b2c1320
Compare
This comment has been minimized.
This comment has been minimized.
b2c1320 to
41c0b39
Compare
This comment has been minimized.
This comment has been minimized.
41c0b39 to
379ce3a
Compare
This comment has been minimized.
This comment has been minimized.
5257223 to
ab5831e
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
e26cce2 to
76e5eb7
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
e999c6e to
49e579a
Compare
This comment has been minimized.
This comment has been minimized.
49e579a to
766d567
Compare
This comment has been minimized.
This comment has been minimized.
766d567 to
e6239b2
Compare
516e113 to
051accd
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
323507d to
63d85b9
Compare
This comment has been minimized.
This comment has been minimized.
| // Reset trace heights for memory chips as 0 | ||
| // SAFETY: boundary_idx is a compile time constant within bounds | ||
| unsafe { | ||
| *trace_heights.get_unchecked_mut(self.boundary_idx) = 0; | ||
| } | ||
| if let Some(merkle_tree_idx) = self.merkle_tree_index { | ||
| // SAFETY: merkle_tree_idx is guaranteed to be in bounds | ||
| unsafe { | ||
| *trace_heights.get_unchecked_mut(merkle_tree_idx) = 0; | ||
| } | ||
| let poseidon2_idx = trace_heights.len() - 2; | ||
| // SAFETY: poseidon2_idx is trace_heights.len() - 2, guaranteed to be in bounds | ||
| unsafe { | ||
| *trace_heights.get_unchecked_mut(poseidon2_idx) = 0; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't reset access adapter heights here because access adapters are shared between memory and normal traces and it won't be correct to reset them to 0. what we want ideally is to remove only the contribution of memory chips to access adapter heights
63d85b9 to
d55c729
Compare
This comment has been minimized.
This comment has been minimized.
Commit: f1c9fba |
jonathanpwang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I added a non-debug assert to ensure the buffer len is not exceeded, since it would lead to UB behavior if it was exceeded at runtime. I think branch prediction will mean it doesn't incur a large perf diff.
We should also add it to the aot version |
This pr primarily adds a
page_indices_since_checkpointbuffer to track page accesses between checkpoints. This buffer is used to initialize the memory trace heights of the next segmentResolves INT-5778