Skip to content

Fix_zero_offset_output_base_assumption #2068

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

YairVaknin-starkware
Copy link
Collaborator

TITLE

Description

Description of the pull request changes and motivation.

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

Copy link

github-actions bot commented Apr 14, 2025

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.142 ± 0.008 2.133 2.159 1.00
head big_factorial 2.146 ± 0.028 2.126 2.220 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.079 ± 0.016 2.062 2.108 1.00
head big_fibonacci 2.090 ± 0.028 2.059 2.152 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.949 ± 0.121 7.810 8.149 1.01 ± 0.02
head blake2s_integration_benchmark 7.872 ± 0.105 7.756 8.073 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.221 ± 0.025 2.198 2.271 1.01 ± 0.01
head compare_arrays_200000 2.206 ± 0.021 2.188 2.260 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.443 ± 0.010 1.431 1.464 1.00 ± 0.01
head dict_integration_benchmark 1.439 ± 0.005 1.432 1.447 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.246 ± 0.016 1.225 1.279 1.01 ± 0.01
head field_arithmetic_get_square_benchmark 1.239 ± 0.007 1.228 1.253 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 7.952 ± 0.059 7.854 8.007 1.00
head integration_builtins 7.979 ± 0.054 7.900 8.073 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.373 ± 0.163 8.120 8.762 1.01 ± 0.03
head keccak_integration_benchmark 8.258 ± 0.199 8.126 8.803 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.182 ± 0.016 2.152 2.210 1.00 ± 0.01
head linear_search 2.178 ± 0.022 2.152 2.217 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.522 ± 0.010 1.506 1.536 1.00 ± 0.01
head math_cmp_and_pow_integration_benchmark 1.519 ± 0.015 1.504 1.556 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.472 ± 0.007 1.460 1.481 1.00
head math_integration_benchmark 1.472 ± 0.007 1.463 1.486 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.229 ± 0.006 1.219 1.238 1.00
head memory_integration_benchmark 1.230 ± 0.012 1.214 1.244 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.584 ± 0.005 1.578 1.595 1.00
head operations_with_data_structures_benchmarks 1.592 ± 0.007 1.583 1.604 1.01 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 539.8 ± 2.6 536.4 543.7 1.00
head pedersen 542.3 ± 5.9 535.2 551.0 1.00 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 648.8 ± 7.4 636.4 659.6 1.00 ± 0.01
head poseidon_integration_benchmark 645.6 ± 4.8 637.2 652.0 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.902 ± 0.010 1.885 1.917 1.00 ± 0.01
head secp_integration_benchmark 1.893 ± 0.008 1.883 1.907 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 643.9 ± 4.2 639.6 654.7 1.01 ± 0.01
head set_integration_benchmark 640.1 ± 3.0 634.3 644.5 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.353 ± 0.054 4.291 4.482 1.00
head uint256_integration_benchmark 4.353 ± 0.031 4.294 4.395 1.00 ± 0.01

Copy link
Collaborator

@yuvalsw yuvalsw left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @YairVaknin-starkware)


vm/src/vm/runners/builtin_runner/output.rs line 27 at r1 (raw file):

    pub(crate) stop_ptr: Option<usize>,
    pub(crate) included: bool,
    pub base_offset: usize,

PLease move to after base, also in the calls

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/add_perp_and_dex_w_bitwise_layouts branch from 03bc24f to 4f54461 Compare April 14, 2025 17:50
Base automatically changed from yairv/add_perp_and_dex_w_bitwise_layouts to starkware-development April 14, 2025 18:16
@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/fix_zero_offset_output_base_assumption branch from e89c602 to 7646a7e Compare April 14, 2025 18:27
Copy link

**Hyper Thereading Benchmark results**




hyperfine -r 2 -n "hyper_threading_main threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_main' -n "hyper_threading_pr threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 1
  Time (mean ± σ):     26.296 s ±  0.035 s    [User: 25.513 s, System: 0.782 s]
  Range (min … max):   26.271 s … 26.321 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     26.570 s ±  0.060 s    [User: 25.753 s, System: 0.814 s]
  Range (min … max):   26.527 s … 26.612 s    2 runs
 
Summary
  hyper_threading_main threads: 1 ran
    1.01 ± 0.00 times faster than hyper_threading_pr threads: 1




hyperfine -r 2 -n "hyper_threading_main threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_main' -n "hyper_threading_pr threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 2
  Time (mean ± σ):     14.634 s ±  0.033 s    [User: 25.679 s, System: 0.787 s]
  Range (min … max):   14.611 s … 14.658 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     14.794 s ±  0.047 s    [User: 25.800 s, System: 0.809 s]
  Range (min … max):   14.761 s … 14.828 s    2 runs
 
Summary
  hyper_threading_main threads: 2 ran
    1.01 ± 0.00 times faster than hyper_threading_pr threads: 2




hyperfine -r 2 -n "hyper_threading_main threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_main' -n "hyper_threading_pr threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 4
  Time (mean ± σ):     10.595 s ±  0.465 s    [User: 37.685 s, System: 0.928 s]
  Range (min … max):   10.266 s … 10.924 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     11.105 s ±  0.199 s    [User: 38.786 s, System: 1.037 s]
  Range (min … max):   10.964 s … 11.246 s    2 runs
 
Summary
  hyper_threading_main threads: 4 ran
    1.05 ± 0.05 times faster than hyper_threading_pr threads: 4




hyperfine -r 2 -n "hyper_threading_main threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_main' -n "hyper_threading_pr threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 6
  Time (mean ± σ):     10.352 s ±  0.057 s    [User: 37.879 s, System: 0.956 s]
  Range (min … max):   10.312 s … 10.392 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     10.814 s ±  0.108 s    [User: 39.259 s, System: 1.049 s]
  Range (min … max):   10.738 s … 10.890 s    2 runs
 
Summary
  hyper_threading_main threads: 6 ran
    1.04 ± 0.01 times faster than hyper_threading_pr threads: 6




hyperfine -r 2 -n "hyper_threading_main threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_main' -n "hyper_threading_pr threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 8
  Time (mean ± σ):     10.467 s ±  0.031 s    [User: 37.991 s, System: 0.974 s]
  Range (min … max):   10.445 s … 10.488 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     10.537 s ±  0.117 s    [User: 39.299 s, System: 1.065 s]
  Range (min … max):   10.454 s … 10.619 s    2 runs
 
Summary
  hyper_threading_main threads: 8 ran
    1.01 ± 0.01 times faster than hyper_threading_pr threads: 8




hyperfine -r 2 -n "hyper_threading_main threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_main' -n "hyper_threading_pr threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 16
  Time (mean ± σ):     10.383 s ±  0.216 s    [User: 38.517 s, System: 1.064 s]
  Range (min … max):   10.230 s … 10.535 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     10.593 s ±  0.126 s    [User: 39.648 s, System: 1.117 s]
  Range (min … max):   10.504 s … 10.682 s    2 runs
 
Summary
  hyper_threading_main threads: 16 ran
    1.02 ± 0.02 times faster than hyper_threading_pr threads: 16


Copy link

codecov bot commented Apr 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.53%. Comparing base (28f4004) to head (7646a7e).
Report is 1 commits behind head on starkware-development.

Additional details and impacted files
@@                  Coverage Diff                   @@
##           starkware-development    #2068   +/-   ##
======================================================
  Coverage                  96.53%   96.53%           
======================================================
  Files                        102      102           
  Lines                      43175    43184    +9     
======================================================
+ Hits                       41680    41689    +9     
  Misses                      1495     1495           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@YairVaknin-starkware YairVaknin-starkware merged commit 9c44e1c into starkware-development Apr 14, 2025
92 of 93 checks passed
@YairVaknin-starkware YairVaknin-starkware deleted the yairv/fix_zero_offset_output_base_assumption branch April 14, 2025 19:01
Stavbe pushed a commit that referenced this pull request Apr 27, 2025
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