Skip to content
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

feat: update default inliner aggressiveness to 0 #6378

Closed
wants to merge 5 commits into from

Conversation

TomAFrench
Copy link
Member

Description

Problem*

Resolves

Summary*

Some discussion in slack about updating the default inliner aggressiveness to 0 as we're currently inlining everything: https://aztecprotocol.slack.com/archives/C04DL2L1UP2/p1730122443946249

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 Dec 6, 2024

Changes to Brillig bytecode sizes

Generated at commit: 5d3f67d5fed1202c102a522c0f3da4e5d3083221, compared to commit: 203242c0c05e9333caaa8df55a4ed9a02e000882

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
brillig_fns_as_values +115 ❌ +575.00%
derive +201 ❌ +145.65%
trait_impl_base_type +36 ❌ +128.57%
inline_decompose_hint_brillig_call +20 ❌ +100.00%
closures_mut_ref +24 ❌ +96.00%
brillig_calls_array +91 ❌ +93.81%
generics +71 ❌ +75.53%
references +116 ❌ +75.32%
trait_as_return_type +14 ❌ +70.00%

Full diff report 👇
Program Brillig opcodes (+/-) %
brillig_fns_as_values 135 (+115) +575.00%
derive 339 (+201) +145.65%
trait_impl_base_type 64 (+36) +128.57%
inline_decompose_hint_brillig_call 40 (+20) +100.00%
closures_mut_ref 49 (+24) +96.00%
brillig_calls_array 188 (+91) +93.81%
generics 165 (+71) +75.53%
references 270 (+116) +75.32%
trait_as_return_type 34 (+14) +70.00%
missing_closure_env 40 (+16) +66.67%
brillig_nested_arrays 290 (+108) +59.34%
embedded_curve_ops 371 (+109) +41.60%
reference_counts 662 (+189) +39.96%
wrapping_operations 69 (+17) +32.69%
higher_order_functions 881 (+204) +30.13%
u16_support 63 (+14) +28.57%
fold_complex_outputs 612 (+131) +27.23%
slice_loop 340 (+71) +26.39%
submodules 34 (+7) +25.93%
conditional_regression_661 159 (+32) +25.20%
assign_ex 39 (+7) +21.88%
6_array 464 (+72) +18.37%
bit_shifts_comptime 48 (+7) +17.07%
regression_4449 877 (+126) +16.78%
hint_black_box 382 (+46) +13.69%
array_dynamic_nested_blackbox_input 1,016 (+115) +12.76%
ecdsa_secp256k1 1,018 (+110) +12.11%
array_to_slice 796 (+78) +10.86%
signed_division 220 (+19) +9.45%
pedersen_check 613 (+48) +8.50%
sha2_byte 2,936 (+169) +6.11%
debug_logs 5,445 (+297) +5.77%
conditional_1 1,251 (+63) +5.30%
strings 962 (+45) +4.91%
brillig_pedersen 591 (+26) +4.60%
regression 982 (+37) +3.92%
bigint 2,277 (+82) +3.74%
array_dynamic_blackbox_input 1,067 (+35) +3.39%
sha256_brillig_performance_regression 1,710 (+48) +2.89%
brillig_calls_conditionals 132 (+3) +2.33%
slice_coercion 338 (+7) +2.11%
ram_blowup_regression 985 (+16) +1.65%
slices 2,221 (+35) +1.60%
brillig_cow_regression 2,199 (+32) +1.48%
array_sort 294 (+1) +0.34%
side_effects_constrain_array 128 (-1) -0.78%
struct_inputs 255 (-3) -1.16%
7_function 545 (-34) -5.87%
simple_shield 852 (-56) -6.17%
poseidon2 306 (-29) -8.66%
aes128_encrypt 504 (-48) -8.70%
bench_2_to_17 298 (-30) -9.15%
tuple_inputs 330 (-36) -9.84%
regression_6674_1 220 (-27) -10.93%
regression_6674_2 220 (-30) -12.00%
poseidon_bn254_hash 4,759 (-666) -12.28%
poseidon_bn254_hash_width_3 4,759 (-666) -12.28%
nested_array_in_slice 1,070 (-162) -13.15%
nested_array_dynamic 2,126 (-331) -13.47%
keccak256 1,771 (-426) -19.39%
binary_operator_overloading 316 (-80) -20.20%
fold_numeric_generic_poseidon 591 (-172) -22.54%
no_predicates_numeric_generic_poseidon 591 (-172) -22.54%
slice_regex 1,663 (-570) -25.53%
regression_5252 3,418 (-1,176) -25.60%
u128 2,050 (-707) -25.64%
brillig_cow 273 (-99) -26.61%
conditional_regression_short_circuit 919 (-345) -27.29%
sha256_regression 5,003 (-1,914) -27.67%
poseidonsponge_x5_254 3,039 (-1,215) -28.56%
fold_2_to_17 416 (-168) -28.77%
6 836 (-355) -29.81%
sha256_var_size_regression 1,141 (-585) -33.89%
merkle_insert 499 (-266) -34.77%
sha256_var_witness_const_regression 834 (-474) -36.24%
sha256_var_padding_regression 3,077 (-2,052) -40.01%
uhashmap 7,864 (-6,137) -43.83%
sha256 1,307 (-1,101) -45.72%
hashmap 8,853 (-12,945) -59.39%

Copy link
Contributor

github-actions bot commented Dec 6, 2024

Changes to number of Brillig opcodes executed

Generated at commit: 5d3f67d5fed1202c102a522c0f3da4e5d3083221, compared to commit: 203242c0c05e9333caaa8df55a4ed9a02e000882

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
brillig_fns_as_values +166 ❌ +922.22%
brillig_nested_arrays +349 ❌ +225.16%
trait_impl_base_type +44 ❌ +183.33%
binary_operator_overloading +280 ❌ +152.17%
derive +196 ❌ +145.19%
brillig_calls_array +130 ❌ +136.84%
trait_as_return_type +22 ❌ +122.22%
u16_support +43 ❌ +116.22%
closures_mut_ref +24 ❌ +114.29%

Full diff report 👇
Program Brillig opcodes (+/-) %
brillig_fns_as_values 184 (+166) +922.22%
brillig_nested_arrays 504 (+349) +225.16%
trait_impl_base_type 68 (+44) +183.33%
binary_operator_overloading 464 (+280) +152.17%
derive 331 (+196) +145.19%
brillig_calls_array 225 (+130) +136.84%
trait_as_return_type 40 (+22) +122.22%
u16_support 80 (+43) +116.22%
closures_mut_ref 45 (+24) +114.29%
inline_decompose_hint_brillig_call 38 (+20) +111.11%
wrapping_operations 83 (+39) +88.64%
references 435 (+199) +84.32%
u128 45,222 (+20,260) +81.16%
reference_counts 725 (+322) +79.90%
6_array 2,905 (+1,274) +78.11%
generics 229 (+99) +76.15%
brillig_calls_conditionals 196 (+83) +73.45%
embedded_curve_ops 418 (+174) +71.31%
side_effects_constrain_array 140 (+54) +62.79%
missing_closure_env 32 (+12) +60.00%
sha2_byte 75,182 (+27,873) +58.92%
hashmap 83,945 (+29,805) +55.05%
hint_black_box 1,081 (+364) +50.77%
higher_order_functions 1,888 (+633) +50.44%
submodules 34 (+11) +47.83%
assign_ex 37 (+11) +42.31%
sha256_var_size_regression 23,300 (+6,923) +42.27%
slice_loop 1,330 (+388) +41.19%
sha256_regression 165,266 (+46,562) +39.23%
signed_division 209 (+53) +33.97%
bit_shifts_comptime 44 (+11) +33.33%
sha256_var_padding_regression 295,967 (+73,751) +33.19%
fold_complex_outputs 1,020 (+252) +32.81%
uhashmap 185,399 (+39,853) +27.38%
conditional_regression_661 150 (+30) +25.00%
fold_2_to_17 1,367,341 (+273,416) +24.99%
pedersen_check 1,211 (+239) +24.59%
array_to_slice 2,039 (+369) +22.10%
sha256_brillig_performance_regression 28,204 (+5,010) +21.60%
strings 2,143 (+373) +21.07%
array_dynamic_blackbox_input 22,023 (+3,814) +20.95%
ecdsa_secp256k1 8,169 (+1,380) +20.33%
regression_4449 240,128 (+39,271) +19.55%
poseidon_bn254_hash 193,728 (+31,134) +19.15%
poseidon_bn254_hash_width_3 193,728 (+31,134) +19.15%
fold_numeric_generic_poseidon 6,120 (+977) +19.00%
no_predicates_numeric_generic_poseidon 6,120 (+977) +19.00%
slices 3,994 (+629) +18.69%
slice_regex 4,122 (+648) +18.65%
brillig_cow_regression 615,844 (+96,758) +18.64%
ram_blowup_regression 923,497 (+144,847) +18.60%
nested_array_in_slice 1,835 (+271) +17.33%
regression_5252 1,070,947 (+155,921) +17.04%
poseidonsponge_x5_254 214,732 (+30,979) +16.86%
sha256 17,521 (+2,525) +16.84%
6 8,668 (+1,218) +16.35%
conditional_regression_short_circuit 8,748 (+1,220) +16.21%
brillig_pedersen 1,114 (+142) +14.61%
aes128_encrypt 5,285 (+566) +11.99%
simple_shield 3,204 (+333) +11.60%
sha256_var_witness_const_regression 8,026 (+826) +11.47%
nested_array_dynamic 3,861 (+397) +11.46%
conditional_1 6,337 (+620) +10.84%
brillig_cow 1,260 (+120) +10.53%
array_dynamic_nested_blackbox_input 4,995 (+445) +9.78%
7_function 2,763 (+226) +8.91%
tuple_inputs 687 (+54) +8.53%
struct_inputs 610 (+44) +7.77%
poseidon2 752 (+54) +7.74%
bench_2_to_17 633,958 (+44,117) +7.48%
keccak256 36,884 (+2,107) +6.06%
debug_logs 5,469 (+309) +5.99%
regression_6674_1 856 (+37) +4.52%
regression_6674_2 856 (+34) +4.14%
merkle_insert 3,910 (+141) +3.74%
slice_coercion 339 (+11) +3.35%
regression 2,862 (+46) +1.63%
array_sort 526 (+3) +0.57%

Copy link
Contributor

github-actions bot commented Dec 6, 2024

Peak Memory Sample

Program Peak Memory
keccak256 81.56M
workspace 122.40M
regression_4709 333.78M
ram_blowup_regression 2.55G

Copy link
Contributor

github-actions bot commented Jan 4, 2025

Compilation Report

Program Compilation Time %
sha256_regression 1.304s -7%
regression_4709 0.762s -6%
ram_blowup_regression 14.640s -5%
rollup-root 3.590s 2%
rollup-block-merge 3.650s -5%
rollup-base-public 113.000s 1%
rollup-base-private 93.700s -3%
private-kernel-tail 1.007s 0%
private-kernel-reset 6.740s -4%
private-kernel-inner 2.022s -2%
noir-contracts 83.500s -2%

Copy link
Contributor

github-actions bot commented Jan 4, 2025

Execution Report

Program Execution Time %
sha256_regression 0.101s 1%
regression_4709 0.001s 0%
ram_blowup_regression 0.584s -1%
rollup-root 0.127s 2%
rollup-block-merge 0.125s -4%
rollup-base-public 6.520s 0%
rollup-base-private 5.690s 0%
private-kernel-tail 0.025s 8%
private-kernel-reset 0.417s 7%
private-kernel-inner 0.117s 0%

Copy link
Contributor

github-actions bot commented Jan 4, 2025

Compilation Memory Report

Program Peak Memory %
keccak256 78.48M 0%
workspace 123.56M 0%
regression_4709 422.91M 0%
ram_blowup_regression 1.58G 0%
rollup-base-public 10.47G 0%
rollup-base-private 6.57G 0%
private-kernel-tail 200.17M -1%
private-kernel-reset 714.12M -1%
private-kernel-inner 290.39M -1%

Copy link
Contributor

github-actions bot commented Jan 4, 2025

Execution Memory Report

Program Peak Memory %
keccak256 74.61M 0%
workspace 123.82M 0%
regression_4709 315.92M 0%
ram_blowup_regression 512.47M 0%
rollup-base-public 3.05G 0%
rollup-base-private 2.97G 0%
private-kernel-tail 182.31M 0%
private-kernel-reset 254.96M -1%
private-kernel-inner 214.33M 0%

@TomAFrench TomAFrench closed this Jan 4, 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