Skip to content

Conversation

@fmoletta
Copy link
Contributor

@fmoletta fmoletta commented Mar 15, 2024

Adds zero segment fields & methods to MemorySegmentManager
These methods will be used by the new builtin, and are currenlty unused

@github-actions
Copy link

github-actions bot commented Mar 15, 2024

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.328 ± 0.016 2.308 2.362 1.01 ± 0.02
head big_factorial 2.299 ± 0.031 2.270 2.369 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.367 ± 0.075 2.319 2.575 1.04 ± 0.03
head big_fibonacci 2.285 ± 0.020 2.253 2.315 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 8.572 ± 0.118 8.387 8.790 1.01 ± 0.05
head blake2s_integration_benchmark 8.520 ± 0.399 8.259 9.574 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.366 ± 0.017 2.346 2.403 1.00 ± 0.01
head compare_arrays_200000 2.356 ± 0.021 2.318 2.386 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.496 ± 0.027 1.476 1.571 1.01 ± 0.02
head dict_integration_benchmark 1.480 ± 0.009 1.470 1.495 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.315 ± 0.009 1.301 1.325 1.01 ± 0.01
head field_arithmetic_get_square_benchmark 1.308 ± 0.017 1.289 1.346 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 8.552 ± 0.099 8.378 8.650 1.01 ± 0.02
head integration_builtins 8.495 ± 0.184 8.306 8.713 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.803 ± 0.123 8.634 8.963 1.00 ± 0.04
head keccak_integration_benchmark 8.801 ± 0.332 8.572 9.646 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.404 ± 0.021 2.385 2.458 1.02 ± 0.01
head linear_search 2.356 ± 0.023 2.327 2.407 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.602 ± 0.024 1.572 1.658 1.00 ± 0.02
head math_cmp_and_pow_integration_benchmark 1.594 ± 0.012 1.568 1.616 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.453 ± 0.017 1.436 1.488 1.01 ± 0.01
head math_integration_benchmark 1.441 ± 0.007 1.432 1.452 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.307 ± 0.011 1.286 1.321 1.03 ± 0.01
head memory_integration_benchmark 1.273 ± 0.009 1.260 1.286 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.631 ± 0.006 1.622 1.641 1.00 ± 0.01
head operations_with_data_structures_benchmarks 1.628 ± 0.019 1.607 1.675 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 597.0 ± 4.9 593.2 610.3 1.00 ± 0.02
head pedersen 596.4 ± 9.5 590.1 616.3 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 999.7 ± 4.7 993.4 1006.3 1.01 ± 0.01
head poseidon_integration_benchmark 989.2 ± 6.5 978.1 997.3 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.872 ± 0.020 1.860 1.928 1.00
head secp_integration_benchmark 1.873 ± 0.041 1.846 1.985 1.00 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 702.4 ± 6.5 695.1 715.3 1.01 ± 0.01
head set_integration_benchmark 697.9 ± 3.6 692.2 702.1 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.683 ± 0.046 4.638 4.788 1.01 ± 0.01
head uint256_integration_benchmark 4.639 ± 0.044 4.589 4.700 1.00

@codecov
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 37.93103% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 96.56%. Comparing base (44de614) to head (f7098eb).

Files Patch % Lines
vm/src/vm/vm_memory/memory_segments.rs 28.00% 18 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1668      +/-   ##
==========================================
- Coverage   96.61%   96.56%   -0.05%     
==========================================
  Files          95       95              
  Lines       38390    38409      +19     
==========================================
+ Hits        37089    37090       +1     
- Misses       1301     1319      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fmoletta fmoletta marked this pull request as ready for review March 25, 2024 15:42
@pefontana pefontana added this pull request to the merge queue Mar 26, 2024
Comment on lines +29 to +30
// This segment will never have index 0 so we use 0 to represent uninitialized value
zero_segment_index: usize,
Copy link
Contributor

Choose a reason for hiding this comment

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

Alternatively use Option<NonZeroUsize>.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Mar 26, 2024
@fmoletta fmoletta enabled auto-merge March 26, 2024 21:31
@fmoletta fmoletta added this pull request to the merge queue Mar 26, 2024
Merged via the queue into main with commit 42e0416 Mar 26, 2024
@fmoletta fmoletta deleted the add-zero-segment branch March 26, 2024 23:32
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.

5 participants