Skip to content

add compute_budget_instruction_details to InstructionMeta #5795

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

apfitzge
Copy link

Problem

  • Doing multiple loops to gather compute-budget instruction details

Summary of Changes

  • Do a single loop within InstructionMeta

Fixes #

@apfitzge
Copy link
Author

Benchmark Results:

`process_compute_budget_instructions`
bench_process_compute_budget_instructions_empty/0 instructions
                        time:   [35.477 µs 35.515 µs 35.550 µs]
                        thrpt:  [28.804 Melem/s 28.833 Melem/s 28.864 Melem/s]
                 change:
                        time:   [-4.2374% -3.9878% -3.7398%] (p = 0.00 < 0.05)
                        thrpt:  [+3.8851% +4.1535% +4.4249%]
                        Performance has improved.

bench_process_compute_budget_instructions_empty/0 instructions #2
                        time:   [35.113 µs 35.153 µs 35.197 µs]
                        thrpt:  [29.094 Melem/s 29.130 Melem/s 29.163 Melem/s]
                 change:
                        time:   [-5.0326% -4.7264% -4.4302%] (p = 0.00 < 0.05)
                        thrpt:  [+4.6355% +4.9608% +5.2993%]
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe

bench_process_compute_budget_instructions_no_builtins/4 dummy Instructions
                        time:   [65.301 µs 65.430 µs 65.572 µs]
                        thrpt:  [15.616 Melem/s 15.650 Melem/s 15.681 Melem/s]
                 change:
                        time:   [+17.387% +17.732% +18.100%] (p = 0.00 < 0.05)
                        thrpt:  [-15.326% -15.061% -14.812%]
                        Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

bench_process_compute_budget_instructions_no_builtins/4 dummy Instructions #2
                        time:   [65.369 µs 65.492 µs 65.615 µs]
                        thrpt:  [15.606 Melem/s 15.635 Melem/s 15.665 Melem/s]
                 change:
                        time:   [+17.464% +17.855% +18.262%] (p = 0.00 < 0.05)
                        thrpt:  [-15.442% -15.150% -14.868%]
                        Performance has regressed.

bench_process_compute_budget_instructions_compute_budgets/4 compute-budget instructions
                        time:   [70.959 µs 71.168 µs 71.372 µs]
                        thrpt:  [14.347 Melem/s 14.389 Melem/s 14.431 Melem/s]
                 change:
                        time:   [+28.153% +28.680% +29.207%] (p = 0.00 < 0.05)
                        thrpt:  [-22.605% -22.288% -21.968%]
                        Performance has regressed.
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild

bench_process_compute_budget_instructions_compute_budgets/4 compute-budget instructions #2
                        time:   [71.905 µs 72.094 µs 72.293 µs]
                        thrpt:  [14.165 Melem/s 14.204 Melem/s 14.241 Melem/s]
                 change:
                        time:   [+28.783% +29.209% +29.670%] (p = 0.00 < 0.05)
                        thrpt:  [-22.881% -22.606% -22.350%]
                        Performance has regressed.
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) high mild
  1 (1.00%) high severe

bench_process_compute_budget_instructions_builtins/4 dummy builtins
                        time:   [107.32 µs 107.46 µs 107.62 µs]
                        thrpt:  [9.5153 Melem/s 9.5289 Melem/s 9.5419 Melem/s]
                 change:
                        time:   [+6.6307% +6.9359% +7.2563%] (p = 0.00 < 0.05)
                        thrpt:  [-6.7654% -6.4860% -6.2183%]
                        Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

bench_process_compute_budget_instructions_builtins/4 dummy builtins #2
                        time:   [107.16 µs 107.33 µs 107.53 µs]
                        thrpt:  [9.5230 Melem/s 9.5402 Melem/s 9.5560 Melem/s]
                 change:
                        time:   [+7.2106% +7.5228% +7.8349%] (p = 0.00 < 0.05)
                        thrpt:  [-7.2656% -6.9965% -6.7257%]
                        Performance has regressed.
Found 4 outliers among 100 measurements (4.00%)
  4 (4.00%) high mild

bench_process_compute_budget_instructions_mixed/355 mixed instructions
                        time:   [2.5596 ms 2.5616 ms 2.5636 ms]
                        thrpt:  [399.43 Kelem/s 399.74 Kelem/s 400.07 Kelem/s]
                 change:
                        time:   [+97.026% +97.361% +97.712%] (p = 0.00 < 0.05)
                        thrpt:  [-49.421% -49.331% -49.245%]
                        Performance has regressed.
Found 5 outliers among 100 measurements (5.00%)
  5 (5.00%) low mild

bench_process_compute_budget_instructions_mixed/355 mixed instructions #2
                        time:   [2.5537 ms 2.5560 ms 2.5583 ms]
                        thrpt:  [400.27 Kelem/s 400.63 Kelem/s 400.99 Kelem/s]
                 change:
                        time:   [+96.982% +97.441% +97.904%] (p = 0.00 < 0.05)
                        thrpt:  [-49.471% -49.352% -49.234%]
                        Performance has regressed.
`receive_and_buffer`
receive_and_buffer/sanitized_transaction_max_instructions
                        time:   [811.22 ms 811.58 ms 811.95 ms]
                        thrpt:  [20.179 Kelem/s 20.188 Kelem/s 20.197 Kelem/s]
                 change:
                        time:   [-2.3816% -2.2946% -2.2033%] (p = 0.00 < 0.05)
                        thrpt:  [+2.2529% +2.3485% +2.4397%]
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) low mild

receive_and_buffer/sanitized_transaction_min_instructions
                        time:   [36.649 ms 36.689 ms 36.727 ms]
                        thrpt:  [446.11 Kelem/s 446.57 Kelem/s 447.05 Kelem/s]
                 change:
                        time:   [-0.7626% -0.6043% -0.4407%] (p = 0.00 < 0.05)
                        thrpt:  [+0.4427% +0.6079% +0.7684%]
                        Change within noise threshold.

Benchmarking receive_and_buffer/transaction_view_max_instructions: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 13.2s, or reduce sample count to 30.
receive_and_buffer/transaction_view_max_instructions
                        time:   [132.35 ms 132.83 ms 133.28 ms]
                        thrpt:  [122.93 Kelem/s 123.35 Kelem/s 123.80 Kelem/s]
                 change:
                        time:   [-3.9298% -3.5658% -3.2352%] (p = 0.00 < 0.05)
                        thrpt:  [+3.3434% +3.6976% +4.0905%]
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) low mild

receive_and_buffer/transaction_view_min_instructions
                        time:   [18.972 ms 18.992 ms 19.013 ms]
                        thrpt:  [861.74 Kelem/s 862.67 Kelem/s 863.60 Kelem/s]
                 change:
                        time:   [-3.0307% -2.9104% -2.7770%] (p = 0.00 < 0.05)
                        thrpt:  [+2.8563% +2.9977% +3.1255%]
                        Performance has improved.

@apfitzge apfitzge force-pushed the instruction_meta_cbid branch from b94b4d2 to 7052789 Compare April 14, 2025 20:57
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.9%. Comparing base (3bb500d) to head (7052789).
Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #5795     +/-   ##
=========================================
- Coverage    83.0%    82.9%   -0.1%     
=========================================
  Files         828      828             
  Lines      375829   375852     +23     
=========================================
- Hits       311965   311922     -43     
- Misses      63864    63930     +66     
🚀 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.

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