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

chore: PR 6782 w/ PR 6783 #6784

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

chore: PR 6782 w/ PR 6783 #6784

wants to merge 10 commits into from

Conversation

vezenovm
Copy link
Contributor

Description

Problem*

Resolves

Summary*

Pushed to see the bench report of #6782 with the #6783 optimization.

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 12, 2024

Changes to Brillig bytecode sizes

Generated at commit: 5f8cb04e452c26fe2fcdeed400fe9ab58ce0515a, compared to commit: 1b0dd4149d9249f0ea4fb5e2228c688e0135618f

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
to_le_bytes -12 ✅ -8.96%
slices -216 ✅ -9.11%
wildcard_type -33 ✅ -10.06%
nested_array_dynamic -324 ✅ -11.66%
reference_counts -63 ✅ -11.89%
nested_array_in_slice -189 ✅ -13.30%
slice_regex -396 ✅ -15.06%
nested_array_dynamic_simple -30 ✅ -22.39%
fold_complex_outputs -153 ✅ -24.36%
brillig_nested_arrays -198 ✅ -52.11%

Full diff report 👇
Program Brillig opcodes (+/-) %
array_dedup_regression 259 (+3) +1.17%
regression_4709 133,737 (-3) -0.00%
modulus 1,762 (-6) -0.34%
fold_numeric_generic_poseidon 754 (-3) -0.40%
no_predicates_numeric_generic_poseidon 754 (-3) -0.40%
fold_2_to_17 578 (-3) -0.52%
debug_logs 5,124 (-36) -0.70%
slice_dynamic_index 2,504 (-18) -0.71%
pedersen_hash 367 (-3) -0.81%
hashmap 21,693 (-206) -0.94%
check_large_field_bits 292 (-3) -1.02%
array_dynamic_blackbox_input 1,032 (-12) -1.15%
to_be_bytes 209 (-3) -1.42%
pedersen_commitment 206 (-3) -1.44%
sha2_byte 2,743 (-42) -1.51%
regression 939 (-15) -1.57%
brillig_oracle 364 (-6) -1.62%
simple_shield 899 (-15) -1.64%
poseidon_bn254_hash_width_3 5,413 (-92) -1.67%
poseidon_bn254_hash 5,413 (-92) -1.67%
nested_dyn_array_regression_5782 172 (-3) -1.71%
hint_black_box 336 (-6) -1.75%
keccak256 2,158 (-39) -1.78%
regression_4449 748 (-15) -1.97%
7 144 (-3) -2.04%
blake3 144 (-3) -2.04%
uhashmap 13,887 (-291) -2.05%
7_function 570 (-12) -2.06%
hash_to_field 139 (-3) -2.11%
aes128_encrypt 543 (-12) -2.16%
u128 2,754 (-63) -2.24%
6_array 392 (-9) -2.24%
sha256_regression 6,851 (-162) -2.31%
conditional_regression_661 124 (-3) -2.36%
array_to_slice 715 (-18) -2.46%
poseidonsponge_x5_254 4,245 (-108) -2.48%
conditional_1 1,176 (-30) -2.49%
ram_blowup_regression 957 (-27) -2.74%
brillig_cow_regression 2,143 (-63) -2.86%
regression_5252 4,591 (-135) -2.86%
strings 914 (-27) -2.87%
if_else_chain 101 (-3) -2.88%
ecdsa_secp256k1 899 (-27) -2.92%
sha256_var_padding_regression 5,057 (-153) -2.94%
higher_order_functions 674 (-21) -3.02%
pedersen_check 556 (-18) -3.14%
brillig_pedersen 556 (-18) -3.14%
brillig_constant_reference_regression 84 (-3) -3.45%
conditional_regression_421 83 (-3) -3.49%
sha256_var_witness_const_regression 1,287 (-51) -3.81%
brillig_cow 372 (-15) -3.88%
array_dynamic_nested_blackbox_input 892 (-36) -3.88%
simple_radix 74 (-3) -3.90%
conditional_regression_short_circuit 1,246 (-54) -4.15%
sha256_brillig_performance_regression 1,650 (-72) -4.18%
slice_loop 266 (-12) -4.32%
6 1,173 (-54) -4.40%
side_effects_constrain_array 129 (-6) -4.44%
sha256 2,369 (-111) -4.48%
bigint 2,165 (-102) -4.50%
regression_6674_1 244 (-12) -4.69%
global_consts 227 (-12) -5.02%
brillig_rc_regression_6123 170 (-9) -5.03%
merkle_insert 765 (-43) -5.32%
brillig_uninitialized_arrays 51 (-3) -5.56%
to_bits 201 (-12) -5.63%
regression_6674_2 247 (-15) -5.73%
regression_struct_array_conditional 570 (-36) -5.94%
to_bytes_integration 88 (-6) -6.38%
regression_5045 87 (-6) -6.45%
databus_composite_calldata 390 (-30) -7.14%
struct_inputs 258 (-21) -7.53%
simple_2d_array 106 (-9) -7.83%
sha256_var_size_regression 1,720 (-148) -7.92%
to_bytes_consistent 135 (-12) -8.16%
regression_6674_3 552 (-51) -8.46%
to_le_bytes 122 (-12) -8.96%
slices 2,156 (-216) -9.11%
wildcard_type 295 (-33) -10.06%
nested_array_dynamic 2,454 (-324) -11.66%
reference_counts 467 (-63) -11.89%
nested_array_in_slice 1,232 (-189) -13.30%
slice_regex 2,233 (-396) -15.06%
nested_array_dynamic_simple 104 (-30) -22.39%
fold_complex_outputs 475 (-153) -24.36%
brillig_nested_arrays 182 (-198) -52.11%

Copy link
Contributor

github-actions bot commented Dec 12, 2024

Changes to number of Brillig opcodes executed

Generated at commit: 5f8cb04e452c26fe2fcdeed400fe9ab58ce0515a, compared to commit: 1b0dd4149d9249f0ea4fb5e2228c688e0135618f

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
merkle_insert +574 ❌ +17.97%
simple_shield +316 ❌ +13.17%
wildcard_type -51 ✅ -9.77%
slice_regex -387 ✅ -10.02%
nested_array_in_slice -177 ✅ -10.17%
reference_counts -60 ✅ -13.13%
fold_complex_outputs -150 ✅ -16.45%
nested_array_dynamic_simple -30 ✅ -25.00%
array_dedup_regression -413 ✅ -37.89%
brillig_nested_arrays -198 ✅ -56.09%

Full diff report 👇
Program Brillig opcodes (+/-) %
merkle_insert 3,769 (+574) +17.97%
simple_shield 2,716 (+316) +13.17%
array_dynamic_blackbox_input 18,209 (+297) +1.66%
sha2_byte 45,877 (+341) +0.75%
sha256_brillig_performance_regression 22,814 (+68) +0.30%
sha256_var_padding_regression 205,422 (+571) +0.28%
ram_blowup_regression 721,038 (+815) +0.11%
brillig_cow_regression 479,934 (+497) +0.10%
fold_2_to_17 1,093,919 (-3) -0.00%
modulus 19,172 (-6) -0.03%
check_large_field_bits 2,740 (-3) -0.11%
to_be_bytes 2,216 (-3) -0.14%
brillig_oracle 2,433 (-6) -0.25%
u128 24,831 (-63) -0.25%
7 1,106 (-3) -0.27%
blake3 1,106 (-3) -0.27%
poseidonsponge_x5_254 183,645 (-501) -0.27%
aes128_encrypt 4,326 (-12) -0.28%
to_bytes_integration 2,065 (-6) -0.29%
sha256_regression 116,817 (-363) -0.31%
hash_to_field 908 (-3) -0.33%
keccak256 32,474 (-111) -0.34%
slice_dynamic_index 4,664 (-18) -0.38%
7_function 2,333 (-12) -0.51%
to_le_bytes 1,152 (-6) -0.52%
regression 2,810 (-15) -0.53%
regression_5252 914,986 (-5,028) -0.55%
pedersen_hash 526 (-3) -0.57%
global_consts 1,773 (-12) -0.67%
debug_logs 5,136 (-36) -0.70%
hint_black_box 717 (-6) -0.83%
array_to_slice 1,667 (-18) -1.07%
pedersen_commitment 246 (-3) -1.20%
6_array 1,631 (-21) -1.27%
brillig_cow 1,140 (-15) -1.30%
fold_numeric_generic_poseidon 4,941 (-66) -1.32%
no_predicates_numeric_generic_poseidon 4,941 (-66) -1.32%
regression_6674_1 816 (-12) -1.45%
strings 1,767 (-27) -1.51%
uhashmap 144,661 (-2,287) -1.56%
to_bytes_consistent 754 (-12) -1.57%
higher_order_functions 1,215 (-21) -1.70%
nested_dyn_array_regression_5782 171 (-3) -1.72%
regression_6674_2 819 (-15) -1.80%
sha256_var_size_regression 16,311 (-303) -1.82%
slice_loop 939 (-18) -1.88%
to_bits 614 (-12) -1.92%
regression_struct_array_conditional 1,515 (-30) -1.94%
brillig_pedersen 782 (-18) -2.25%
pedersen_check 782 (-18) -2.25%
poseidon_bn254_hash 162,443 (-4,097) -2.46%
poseidon_bn254_hash_width_3 162,443 (-4,097) -2.46%
conditional_regression_661 117 (-3) -2.50%
hashmap 54,038 (-1,502) -2.70%
ecdsa_secp256k1 6,540 (-197) -2.92%
if_else_chain 98 (-3) -2.97%
brillig_rc_regression_6123 290 (-9) -3.01%
regression_6674_3 1,561 (-51) -3.16%
conditional_regression_421 89 (-3) -3.26%
brillig_constant_reference_regression 81 (-3) -3.57%
struct_inputs 566 (-21) -3.58%
conditional_1 5,225 (-200) -3.69%
sha256_var_witness_const_regression 6,571 (-263) -3.85%
simple_radix 69 (-3) -4.17%
slices 3,335 (-159) -4.55%
sha256 13,869 (-663) -4.56%
array_dynamic_nested_blackbox_input 4,301 (-206) -4.57%
databus_composite_calldata 617 (-30) -4.64%
conditional_regression_short_circuit 7,030 (-394) -5.31%
6 6,952 (-394) -5.36%
brillig_uninitialized_arrays 44 (-3) -6.38%
side_effects_constrain_array 86 (-6) -6.52%
simple_2d_array 125 (-9) -6.72%
nested_array_dynamic 3,417 (-303) -8.15%
regression_4449 200,854 (-20,438) -9.24%
wildcard_type 471 (-51) -9.77%
slice_regex 3,474 (-387) -10.02%
nested_array_in_slice 1,564 (-177) -10.17%
reference_counts 397 (-60) -13.13%
fold_complex_outputs 762 (-150) -16.45%
nested_array_dynamic_simple 90 (-30) -25.00%
array_dedup_regression 677 (-413) -37.89%
brillig_nested_arrays 155 (-198) -56.09%

Copy link
Contributor

github-actions bot commented Dec 12, 2024

Peak Memory Sample

Program Peak Memory %
keccak256 78.17M 0%
workspace 121.86M -1%
regression_4709 294.72M 0%
ram_blowup_regression 2.44G 0%
private-kernel-tail 208.77M 0%
private-kernel-reset 861.32M 0%
private-kernel-inner 307.52M 0%
parity-root 174.42M 0%

Copy link
Contributor

github-actions bot commented Dec 12, 2024

Compilation Sample

Program Compilation Time %
sha256_regression 0m1.429s -4%
regression_4709 0m1.528s 0%
ram_blowup_regression 0m16.630s -3%
private-kernel-tail 0m1.102s -14%
private-kernel-reset 0m9.585s 7%
private-kernel-inner 0m2.388s 2%
parity-root 0m0.919s -20%
noir-contracts 2m46.807s 4%

Copy link
Contributor

Changes to circuit sizes

Generated at commit: 5f8cb04e452c26fe2fcdeed400fe9ab58ce0515a, compared to commit: 1b0dd4149d9249f0ea4fb5e2228c688e0135618f

🧾 Summary (10% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
regression_struct_array_conditional -16 ✅ -18.39% -24 ✅ -0.74%
nested_array_in_slice -70 ✅ -6.48% -151 ✅ -2.65%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
array_dynamic_nested_blackbox_input 253 (-12) -4.53% 7,326 (-35) -0.48%
regression_struct_array_conditional 71 (-16) -18.39% 3,203 (-24) -0.74%
nested_array_in_slice 1,010 (-70) -6.48% 5,550 (-151) -2.65%

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.

1 participant