Skip to content

Conversation

vezenovm
Copy link
Contributor

Description

Problem*

Resolves #9486

Summary*

I was just looking to show how we could improve our inline infos computation to remove the inline_simple_functions pass entirely.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

Copy link
Contributor

github-actions bot commented Aug 13, 2025

Changes to number of Brillig opcodes executed

Generated at commit: f56b6fe3dbfc12ed0ae1a758053895a24abb9d57, compared to commit: 5fe0c5025a302a63f5df8c5e8c4a291236fe8612

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
global_var_regression_simple_inliner_min -30 ✅ -38.96%
generics_inliner_min -89 ✅ -39.21%
generics_inliner_zero -89 ✅ -41.78%
regression_9657_inliner_min -25 ✅ -52.08%
array_rc_regression_7842_inliner_zero -87 ✅ -82.86%
mutate_array_copy_inliner_zero -87 ✅ -82.86%

Full diff report 👇
Program Brillig opcodes (+/-) %
regression_9496_inliner_min 641 (+139) +27.69%
brillig_rc_regression_6123_inliner_min 341 (+23) +7.23%
brillig_cow_inliner_min 1,230 (+38) +3.19%
regression_4709_inliner_min 865,112 (-15) -0.00%
bench_2_to_17_inliner_min 550,609 (-20) -0.00%
fold_2_to_17_inliner_min 1,047,269 (-40) -0.00%
regression_5252_inliner_min 940,297 (-40) -0.00%
uhashmap_inliner_zero 164,239 (-47) -0.03%
regression_11294_inliner_min 1,252 (-3) -0.24%
slices_inliner_min 3,836 (-12) -0.31%
fold_numeric_generic_poseidon_inliner_min 4,575 (-40) -0.87%
no_predicates_numeric_generic_poseidon_inliner_min 4,575 (-40) -0.87%
global_consts_inliner_min 1,395 (-18) -1.27%
conditional_regression_short_circuit_inliner_min 957 (-13) -1.34%
regression_7128_inliner_min 994 (-15) -1.49%
array_to_slice_inliner_min 1,859 (-39) -2.05%
slice_regex_inliner_min 4,351 (-92) -2.07%
regression_6674_3_inliner_min 1,486 (-45) -2.94%
uhashmap_inliner_min 169,187 (-5,153) -2.96%
references_inliner_zero 315 (-11) -3.37%
derive_inliner_min 325 (-12) -3.56%
struct_inputs_inliner_min 533 (-23) -4.14%
hashmap_inliner_min 75,720 (-4,226) -5.29%
fold_complex_outputs_inliner_min 697 (-45) -6.06%
loop_inliner_min 173 (-12) -6.49%
fold_complex_outputs_inliner_zero 625 (-44) -6.58%
references_inliner_min 405 (-52) -11.38%
regression_6674_2_inliner_min 684 (-179) -20.74%
reference_only_used_as_alias_inliner_min 197 (-53) -21.20%
regression_6674_1_inliner_min 658 (-179) -21.39%
global_var_regression_entry_points_inliner_min 54 (-15) -21.74%
simple_2d_array_inliner_min 121 (-40) -24.84%
global_slice_rc_regression_8259_inliner_min 190 (-70) -26.92%
u16_support_inliner_min 32 (-12) -27.27%
u16_support_inliner_zero 32 (-12) -27.27%
assign_ex_inliner_min 28 (-11) -28.21%
assign_ex_inliner_zero 28 (-11) -28.21%
closures_mut_ref_inliner_min 23 (-11) -32.35%
closures_mut_ref_inliner_zero 23 (-11) -32.35%
last_uses_regression_8935_inliner_min 344 (-170) -33.07%
array_rc_regression_7842_inliner_min 110 (-60) -35.29%
mutate_array_copy_inliner_min 109 (-60) -35.50%
global_var_regression_simple_inliner_min 47 (-30) -38.96%
generics_inliner_min 138 (-89) -39.21%
generics_inliner_zero 124 (-89) -41.78%
regression_9657_inliner_min 23 (-25) -52.08%
array_rc_regression_7842_inliner_zero 18 (-87) -82.86%
mutate_array_copy_inliner_zero 18 (-87) -82.86%

Copy link
Contributor

github-actions bot commented Aug 13, 2025

Changes to Brillig bytecode sizes

Generated at commit: f56b6fe3dbfc12ed0ae1a758053895a24abb9d57, compared to commit: 5fe0c5025a302a63f5df8c5e8c4a291236fe8612

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
mutate_array_copy_inliner_min -36 ✅ -26.67%
last_uses_regression_8935_inliner_min -162 ✅ -35.29%
generics_inliner_min -67 ✅ -40.12%
generics_inliner_zero -67 ✅ -42.68%
regression_9657_inliner_min -23 ✅ -44.23%
mutate_array_copy_inliner_zero -68 ✅ -77.27%
array_rc_regression_7842_inliner_zero -68 ✅ -77.27%

Full diff report 👇
Program Brillig opcodes (+/-) %
regression_9496_inliner_min 686 (+135) +24.50%
brillig_rc_regression_6123_inliner_min 204 (+25) +13.97%
regression_6674_1_inliner_min 232 (+11) +4.98%
regression_6674_2_inliner_min 254 (+11) +4.53%
regression_4709_inliner_min 133,719 (-11) -0.01%
uhashmap_inliner_zero 6,923 (-16) -0.23%
fold_numeric_generic_poseidon_inliner_min 566 (-2) -0.35%
no_predicates_numeric_generic_poseidon_inliner_min 566 (-2) -0.35%
slices_inliner_min 2,203 (-8) -0.36%
regression_5252_inliner_min 3,353 (-16) -0.47%
regression_11294_inliner_min 301 (-3) -0.99%
reference_counts_inliner_max_inliner_min 1,024 (-17) -1.63%
reference_counts_inliner_0_inliner_min 1,024 (-17) -1.63%
reference_counts_inliner_min_inliner_min 1,024 (-17) -1.63%
reference_counts_inliner_0_inliner_zero 873 (-17) -1.91%
reference_counts_inliner_min_inliner_zero 873 (-17) -1.91%
reference_counts_inliner_max_inliner_zero 873 (-17) -1.91%
uhashmap_inliner_min 7,216 (-209) -2.81%
references_inliner_zero 208 (-7) -3.26%
fold_complex_outputs_inliner_min 516 (-20) -3.73%
conditional_regression_short_circuit_inliner_min 223 (-9) -3.88%
array_to_slice_inliner_min 837 (-35) -4.01%
hashmap_inliner_min 8,915 (-410) -4.40%
fold_2_to_17_inliner_min 332 (-16) -4.60%
slice_regex_inliner_min 1,784 (-88) -4.70%
bench_2_to_17_inliner_min 310 (-16) -4.91%
fold_complex_outputs_inliner_zero 442 (-23) -4.95%
regression_6674_3_inliner_min 635 (-37) -5.51%
brillig_cow_inliner_min 311 (-19) -5.76%
global_consts_inliner_min 213 (-14) -6.17%
loop_inliner_min 113 (-8) -6.61%
struct_inputs_inliner_min 243 (-19) -7.25%
derive_inliner_min 322 (-27) -7.74%
regression_7128_inliner_min 113 (-11) -8.87%
global_var_regression_entry_points_inliner_min 62 (-11) -15.07%
global_slice_rc_regression_8259_inliner_min 190 (-35) -15.56%
references_inliner_min 240 (-46) -16.08%
u16_support_inliner_min 40 (-8) -16.67%
u16_support_inliner_zero 40 (-8) -16.67%
assign_ex_inliner_min 34 (-7) -17.07%
assign_ex_inliner_zero 34 (-7) -17.07%
reference_only_used_as_alias_inliner_min 178 (-45) -20.18%
closures_mut_ref_inliner_min 27 (-7) -20.59%
closures_mut_ref_inliner_zero 27 (-7) -20.59%
simple_2d_array_inliner_min 102 (-34) -25.00%
global_var_regression_simple_inliner_min 53 (-18) -25.35%
array_rc_regression_7842_inliner_min 100 (-36) -26.47%
mutate_array_copy_inliner_min 99 (-36) -26.67%
last_uses_regression_8935_inliner_min 297 (-162) -35.29%
generics_inliner_min 100 (-67) -40.12%
generics_inliner_zero 90 (-67) -42.68%
regression_9657_inliner_min 29 (-23) -44.23%
mutate_array_copy_inliner_zero 20 (-68) -77.27%
array_rc_regression_7842_inliner_zero 20 (-68) -77.27%

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: d674d1e Previous: 5fe0c50 Ratio
test_report_zkpassport_noir-ecdsa_ 3 s 2 s 1.50

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Compilation Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: d674d1e Previous: 5fe0c50 Ratio
private-kernel-reset 116.8 s 7.962 s 14.67
rollup-base-public 36.94 s 13.86 s 2.67
rollup-block-root-empty 27.4 s 22 s 1.25
semaphore-depth-10 4.856 s 0.84 s 5.78

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

Base automatically changed from group-1-audit to master August 27, 2025 16:40
@vezenovm vezenovm added the bench-show Display benchmark results on PR label Sep 4, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

ACVM Benchmarks

Benchmark suite Current: 8ea0d79 Previous: 5fe0c50 Ratio
purely_sequential_opcodes 260375 ns/iter (± 2062) 262366 ns/iter (± 1014) 0.99
perfectly_parallel_opcodes 228041 ns/iter (± 3354) 229023 ns/iter (± 4370) 1.00
perfectly_parallel_batch_inversion_opcodes 2782398 ns/iter (± 2688) 2784140 ns/iter (± 2280) 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Test Suite Duration

Benchmark suite Current: 8ea0d79 Previous: 5fe0c50 Ratio
test_report_AztecProtocol_aztec-packages_noir-projects_aztec-nr 99 s 100 s 0.99
test_report_AztecProtocol_aztec-packages_noir-projects_noir-contracts 129 s 130 s 0.99
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_blob 225 s 219 s 1.03
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_private-kernel-lib 245 s 209 s 1.17
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_reset-kernel-lib 33 s 33 s 1
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_types 103 s 96 s 1.07
test_report_noir-lang_sha256_ 15 s 15 s 1
test_report_noir-lang_sha512_ 12 s 13 s 0.92
test_report_zkpassport_noir-ecdsa_ 1 s 2 s 0.50
test_report_zkpassport_noir_rsa_ 2 s 2 s 1

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

github-actions bot commented Sep 4, 2025

Changes to circuit sizes

Generated at commit: f56b6fe3dbfc12ed0ae1a758053895a24abb9d57, compared to commit: 5fe0c5025a302a63f5df8c5e8c4a291236fe8612

🧾 Summary (10% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
sha512_100_bytes -83 ✅ -0.63% -6 ✅ -0.02%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
sha512_100_bytes 13,090 (-83) -0.63% 39,452 (-6) -0.02%

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Compilation Time

Benchmark suite Current: d674d1e Previous: 5fe0c50 Ratio
private-kernel-inner 2.066 s 1.756 s 1.18
private-kernel-reset 116.8 s 7.962 s 14.67
private-kernel-tail 1.352 s 1.428 s 0.95
rollup-base-public 36.94 s 13.86 s 2.67
rollup-block-root-empty 27.4 s 22 s 1.25
rollup-merge 1.374 s 1.41 s 0.97
rollup-root 1.514 s 1.582 s 0.96
semaphore-depth-10 4.856 s 0.84 s 5.78
sha512-100-bytes 1.408 s 1.758 s 0.80

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Opcode count

Benchmark suite Current: d674d1e Previous: 5fe0c50 Ratio
private-kernel-inner 14888 opcodes 14792 opcodes 1.01
private-kernel-reset 93141 opcodes 68868 opcodes 1.35
private-kernel-tail 11177 opcodes 11177 opcodes 1
rollup-base-public 404619 opcodes 159930 opcodes 2.53
rollup-block-root-empty 82166 opcodes 68108 opcodes 1.21
rollup-merge 1409 opcodes 1409 opcodes 1
rollup-root 2631 opcodes 2631 opcodes 1
semaphore-depth-10 5700 opcodes 5700 opcodes 1
sha512-100-bytes 13090 opcodes 13173 opcodes 0.99

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Opcode count'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.10.

Benchmark suite Current: d674d1e Previous: 5fe0c50 Ratio
private-kernel-reset 93141 opcodes 68868 opcodes 1.35
rollup-base-public 404619 opcodes 159930 opcodes 2.53
rollup-block-root-empty 82166 opcodes 68108 opcodes 1.21

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Execution Time

Benchmark suite Current: d674d1e Previous: 5fe0c50 Ratio
private-kernel-inner 0.015 s 0.016 s 0.94
private-kernel-reset 0.165 s 0.153 s 1.08
private-kernel-tail 0.01 s 0.01 s 1
rollup-base-public 0.34 s 0.16 s 2.13
rollup-merge 0.002 s 0.003 s 0.67
rollup-root 0.004 s 0.004 s 1
semaphore-depth-10 0.025 s 0.021 s 1.19
sha512-100-bytes 0.1 s 0.097 s 1.03

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Artifact Size

Benchmark suite Current: d674d1e Previous: 5fe0c50 Ratio
private-kernel-inner 711.3 KB 709.3 KB 1.00
private-kernel-reset 2436.7 KB 2032.8 KB 1.20
private-kernel-tail 535.6 KB 535.2 KB 1.00
rollup-base-public 7937.5 KB 3328.7 KB 2.38
rollup-block-root-empty 4003 KB 3855 KB 1.04
rollup-merge 188.1 KB 188 KB 1.00
rollup-root 390.6 KB 390.6 KB 1
semaphore-depth-10 559.1 KB 631.5 KB 0.89
sha512-100-bytes 599.2 KB 525.5 KB 1.14

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Compilation Memory

Benchmark suite Current: 8ea0d79 Previous: 5fe0c50 Ratio
private-kernel-inner 291.88 MB 284.79 MB 1.02
private-kernel-reset 595.56 MB 594.25 MB 1.00
private-kernel-tail 264.2 MB 258.95 MB 1.02
rollup-base-private 1440 MB 1350 MB 1.07
rollup-base-public 1620 MB 1400 MB 1.16
rollup-block-root-empty 2480 MB 1020 MB 2.43
rollup-merge 336.65 MB 332.71 MB 1.01
rollup-root 347.62 MB 343.45 MB 1.01
semaphore_depth_10 106.66 MB 106.9 MB 1.00
sha512_100_bytes 197.91 MB 236.02 MB 0.84

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Execution Memory

Benchmark suite Current: 8ea0d79 Previous: 5fe0c50 Ratio
private-kernel-inner 258.14 MB 258.14 MB 1
private-kernel-reset 291.33 MB 291.33 MB 1
private-kernel-tail 242.94 MB 242.94 MB 1
rollup-base-private 503.69 MB 503.7 MB 1.00
rollup-base-public 436.08 MB 436.08 MB 1
rollup-merge 330.47 MB 330.47 MB 1
rollup-root 332.99 MB 332.99 MB 1
semaphore_depth_10 72.43 MB 72.43 MB 1
sha512_100_bytes 58.48 MB 58.23 MB 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Compilation Memory'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 8ea0d79 Previous: 5fe0c50 Ratio
rollup-block-root-empty 2480 MB 1020 MB 2.43

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Execution Memory'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: d674d1e Previous: 5fe0c50 Ratio
rollup-base-private 671.19 MB 503.7 MB 1.33
rollup-base-public 536.62 MB 436.08 MB 1.23

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Execution Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: d674d1e Previous: 5fe0c50 Ratio
rollup-base-public 0.34 s 0.16 s 2.13

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Artifact Size'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: d674d1e Previous: 5fe0c50 Ratio
rollup-base-public 7937.5 KB 3328.7 KB 2.38

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bench-show Display benchmark results on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inlining: Introduce a weight threshold at which we always inline a function
2 participants