Skip to content

feat(optimization): Try to optimize ownership of assign statements#8876

Closed
jfecher wants to merge 8 commits intomasterfrom
jf/assign-ownership
Closed

feat(optimization): Try to optimize ownership of assign statements#8876
jfecher wants to merge 8 commits intomasterfrom
jf/assign-ownership

Conversation

@jfecher
Copy link
Contributor

@jfecher jfecher commented Jun 10, 2025

Description

Problem*

Resolves #8846

Summary*

With this we go from 300 array copies down to 3 (not scaling with loop iterations) for the given test program.
Note that the example program uses slices so #8867 is necessary to count the slice copies.

Additional Context

This is a draft while I verify some corner cases with the assign check.

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.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 10, 2025

Changes to Brillig bytecode sizes

Generated at commit: ff938e6717fb6d69b28d29289a273d309f2de84c, compared to commit: 5a0182fa5c9371ceb91c1f216526812344f6054a

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
array_sort_inliner_max -16 ✅ -3.83%
array_sort_inliner_zero -16 ✅ -3.83%
slice_regex_inliner_max -86 ✅ -4.27%
array_to_slice_inliner_min -39 ✅ -4.44%
higher_order_functions_inliner_max -27 ✅ -4.93%
brillig_cow_inliner_max -18 ✅ -5.13%
slices_inliner_min -130 ✅ -6.01%
slices_inliner_zero -103 ✅ -6.34%
slices_inliner_max -116 ✅ -6.85%
slice_loop_inliner_min -22 ✅ -7.17%
slice_loop_inliner_zero -22 ✅ -7.41%
array_to_slice_inliner_zero -55 ✅ -8.21%
slice_dynamic_index_inliner_min -196 ✅ -8.81%
slice_loop_inliner_max -22 ✅ -9.40%
slice_dynamic_index_inliner_max -409 ✅ -19.64%
slice_dynamic_index_inliner_zero -409 ✅ -19.64%
array_to_slice_inliner_max -130 ✅ -26.16%

Full diff report 👇
Program Brillig opcodes (+/-) %
nested_array_dynamic_inliner_min 1,425 (-3) -0.21%
nested_array_dynamic_inliner_zero 1,425 (-3) -0.21%
nested_array_in_slice_inliner_min 739 (-3) -0.40%
nested_array_in_slice_inliner_zero 739 (-3) -0.40%
no_predicates_numeric_generic_poseidon_inliner_max 632 (-3) -0.47%
fold_numeric_generic_poseidon_inliner_max 632 (-3) -0.47%
conditional_1_inliner_max 554 (-3) -0.54%
conditional_1_inliner_min 514 (-3) -0.58%
conditional_1_inliner_zero 514 (-3) -0.58%
no_predicates_numeric_generic_poseidon_inliner_zero 500 (-3) -0.60%
fold_numeric_generic_poseidon_inliner_zero 500 (-3) -0.60%
7_function_inliner_min 449 (-3) -0.66%
strings_inliner_min 897 (-6) -0.66%
strings_inliner_zero 887 (-6) -0.67%
7_function_inliner_zero 439 (-3) -0.68%
hashmap_inliner_max 17,152 (-126) -0.73%
hashmap_inliner_min 8,724 (-65) -0.74%
array_dynamic_blackbox_input_inliner_min 389 (-3) -0.77%
aes128_encrypt_inliner_min 382 (-3) -0.78%
aes128_encrypt_inliner_zero 373 (-3) -0.80%
array_dynamic_blackbox_input_inliner_max 368 (-3) -0.81%
array_dynamic_blackbox_input_inliner_zero 368 (-3) -0.81%
hashmap_inliner_zero 7,659 (-65) -0.84%
fold_2_to_17_inliner_min 340 (-3) -0.87%
slice_coercion_inliner_max 330 (-3) -0.90%
brillig_cow_inliner_min 330 (-3) -0.90%
slice_coercion_inliner_min 330 (-3) -0.90%
slice_coercion_inliner_zero 330 (-3) -0.90%
bench_2_to_17_inliner_min 329 (-3) -0.90%
array_dynamic_nested_blackbox_input_inliner_min 325 (-3) -0.91%
array_dynamic_nested_blackbox_input_inliner_max 315 (-3) -0.94%
array_dynamic_nested_blackbox_input_inliner_zero 315 (-3) -0.94%
fold_2_to_17_inliner_zero 312 (-3) -0.95%
tuple_inputs_inliner_min 289 (-3) -1.03%
tuple_inputs_inliner_zero 289 (-3) -1.03%
no_predicates_numeric_generic_poseidon_inliner_min 571 (-6) -1.04%
fold_numeric_generic_poseidon_inliner_min 571 (-6) -1.04%
encrypted_log_regression_inliner_min 278 (-3) -1.07%
regression_5252_inliner_zero 3,194 (-36) -1.11%
encrypted_log_regression_inliner_max 265 (-3) -1.12%
encrypted_log_regression_inliner_zero 265 (-3) -1.12%
fold_complex_outputs_inliner_min 500 (-6) -1.19%
brillig_cow_inliner_zero 240 (-3) -1.23%
regression_5252_inliner_min 3,342 (-42) -1.24%
poseidonsponge_x5_254_inliner_min 2,980 (-39) -1.29%
conditional_regression_short_circuit_inliner_min 228 (-3) -1.30%
global_consts_inliner_min 227 (-3) -1.30%
references_inliner_min 227 (-3) -1.30%
strings_inliner_max 905 (-12) -1.31%
poseidonsponge_x5_254_inliner_zero 2,859 (-39) -1.35%
fold_complex_outputs_inliner_zero 429 (-6) -1.38%
regression_capacity_tracker_inliner_max 214 (-3) -1.38%
regression_capacity_tracker_inliner_min 214 (-3) -1.38%
regression_capacity_tracker_inliner_zero 214 (-3) -1.38%
slice_regex_inliner_min 1,835 (-26) -1.40%
regression_4449_inliner_min 204 (-3) -1.45%
conditional_regression_short_circuit_inliner_max 201 (-3) -1.47%
global_consts_inliner_max 201 (-3) -1.47%
global_consts_inliner_zero 201 (-3) -1.47%
conditional_regression_short_circuit_inliner_zero 201 (-3) -1.47%
poseidon_bn254_hash_width_3_inliner_max 4,786 (-72) -1.48%
aes128_encrypt_inliner_max 397 (-6) -1.49%
poseidon_bn254_hash_width_3_inliner_min 4,670 (-72) -1.52%
regression_4449_inliner_max 194 (-3) -1.52%
regression_4449_inliner_zero 194 (-3) -1.52%
slice_regex_inliner_zero 1,606 (-26) -1.59%
hash_to_field_inliner_min 185 (-3) -1.60%
poseidon_bn254_hash_width_3_inliner_zero 4,373 (-72) -1.62%
regression_5252_inliner_max 3,906 (-66) -1.66%
7_function_inliner_max 517 (-9) -1.71%
reference_counts_slices_inliner_0_inliner_min 1,195 (-21) -1.73%
generics_inliner_min 167 (-3) -1.76%
uhashmap_inliner_min 7,153 (-132) -1.81%
hint_black_box_inliner_min 316 (-6) -1.86%
poseidonsponge_x5_254_inliner_max 3,618 (-69) -1.87%
generics_inliner_zero 157 (-3) -1.88%
hint_black_box_inliner_zero 306 (-6) -1.92%
uhashmap_inliner_zero 6,737 (-133) -1.94%
reference_counts_inliner_min_inliner_min 1,027 (-21) -2.00%
reference_counts_inliner_0_inliner_min 1,027 (-21) -2.00%
reference_counts_inliner_max_inliner_min 1,027 (-21) -2.00%
6_inliner_min 142 (-3) -2.07%
reference_counts_slices_inliner_0_inliner_zero 984 (-21) -2.09%
regression_1144_1169_2399_6609_inliner_min 974 (-21) -2.11%
7_inliner_min 139 (-3) -2.11%
brillig_blake2s_inliner_min 139 (-3) -2.11%
blake3_inliner_min 139 (-3) -2.11%
array_rc_regression_7842_inliner_min 136 (-3) -2.16%
simple_2d_array_inliner_min 136 (-3) -2.16%
mutate_array_copy_inliner_min 135 (-3) -2.17%
6_inliner_max 132 (-3) -2.22%
6_inliner_zero 132 (-3) -2.22%
struct_inputs_inliner_min 262 (-6) -2.24%
7_inliner_max 129 (-3) -2.27%
brillig_blake2s_inliner_max 129 (-3) -2.27%
blake3_inliner_max 129 (-3) -2.27%
7_inliner_zero 129 (-3) -2.27%
brillig_blake2s_inliner_zero 129 (-3) -2.27%
blake3_inliner_zero 129 (-3) -2.27%
reference_counts_inliner_max_inliner_zero 875 (-21) -2.34%
reference_counts_inliner_0_inliner_zero 875 (-21) -2.34%
reference_counts_inliner_min_inliner_zero 875 (-21) -2.34%
regression_1144_1169_2399_6609_inliner_max 870 (-21) -2.36%
regression_1144_1169_2399_6609_inliner_zero 870 (-21) -2.36%
struct_inputs_inliner_zero 243 (-6) -2.41%
reference_counts_slices_inliner_0_inliner_max 707 (-18) -2.48%
reference_counts_inliner_0_inliner_max 678 (-18) -2.59%
reference_counts_inliner_min_inliner_max 678 (-18) -2.59%
reference_counts_inliner_max_inliner_max 678 (-18) -2.59%
side_effects_constrain_array_inliner_min 112 (-3) -2.61%
side_effects_constrain_array_inliner_zero 112 (-3) -2.61%
nested_array_dynamic_inliner_max 1,676 (-48) -2.78%
tuple_inputs_inliner_max 307 (-9) -2.85%
hint_black_box_inliner_max 302 (-9) -2.89%
higher_order_functions_inliner_min 1,089 (-33) -2.94%
uhashmap_inliner_max 11,246 (-343) -2.96%
array_neq_inliner_min 96 (-3) -3.03%
array_eq_inliner_min 94 (-3) -3.09%
higher_order_functions_inliner_zero 629 (-21) -3.23%
array_rc_regression_7842_inliner_zero 88 (-3) -3.30%
mutate_array_copy_inliner_zero 88 (-3) -3.30%
derive_inliner_zero 261 (-9) -3.33%
array_neq_inliner_max 86 (-3) -3.37%
array_neq_inliner_zero 86 (-3) -3.37%
array_eq_inliner_max 84 (-3) -3.45%
array_eq_inliner_zero 84 (-3) -3.45%
derive_inliner_min 333 (-12) -3.48%
struct_inputs_inliner_max 247 (-9) -3.52%
array_sort_inliner_min 436 (-16) -3.54%
array_sort_inliner_max 402 (-16) -3.83%
array_sort_inliner_zero 402 (-16) -3.83%
slice_regex_inliner_max 1,930 (-86) -4.27%
array_to_slice_inliner_min 840 (-39) -4.44%
higher_order_functions_inliner_max 521 (-27) -4.93%
brillig_cow_inliner_max 333 (-18) -5.13%
slices_inliner_min 2,033 (-130) -6.01%
slices_inliner_zero 1,522 (-103) -6.34%
slices_inliner_max 1,577 (-116) -6.85%
slice_loop_inliner_min 285 (-22) -7.17%
slice_loop_inliner_zero 275 (-22) -7.41%
array_to_slice_inliner_zero 615 (-55) -8.21%
slice_dynamic_index_inliner_min 2,028 (-196) -8.81%
slice_loop_inliner_max 212 (-22) -9.40%
slice_dynamic_index_inliner_max 1,674 (-409) -19.64%
slice_dynamic_index_inliner_zero 1,674 (-409) -19.64%
array_to_slice_inliner_max 367 (-130) -26.16%

@github-actions
Copy link
Contributor

github-actions bot commented Jun 10, 2025

Changes to number of Brillig opcodes executed

Generated at commit: ff938e6717fb6d69b28d29289a273d309f2de84c, compared to commit: 5a0182fa5c9371ceb91c1f216526812344f6054a

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
uhashmap_inliner_min -24,356 ✅ -13.78%
uhashmap_inliner_zero -24,360 ✅ -14.43%
uhashmap_inliner_max -23,725 ✅ -16.43%
slice_loop_inliner_min -258 ✅ -21.77%
slice_loop_inliner_zero -258 ✅ -22.03%
slices_inliner_min -958 ✅ -25.20%
slice_loop_inliner_max -234 ✅ -27.76%
array_to_slice_inliner_min -541 ✅ -28.05%
slices_inliner_zero -790 ✅ -28.87%
slice_dynamic_index_inliner_min -1,434 ✅ -29.84%
array_to_slice_inliner_zero -557 ✅ -30.71%
slices_inliner_max -790 ✅ -31.69%
slice_dynamic_index_inliner_max -1,752 ✅ -37.93%
slice_dynamic_index_inliner_zero -1,752 ✅ -37.93%
array_to_slice_inliner_max -530 ✅ -55.61%

Full diff report 👇
Program Brillig opcodes (+/-) %
bench_2_to_17_inliner_min 562,063 (-3) -0.00%
fold_2_to_17_inliner_min 1,041,089 (-6) -0.00%
fold_2_to_17_inliner_zero 1,041,017 (-6) -0.00%
array_dynamic_blackbox_input_inliner_min 6,558 (-3) -0.05%
array_dynamic_blackbox_input_inliner_max 6,529 (-3) -0.05%
array_dynamic_blackbox_input_inliner_zero 6,529 (-3) -0.05%
fold_numeric_generic_poseidon_inliner_zero 4,450 (-3) -0.07%
no_predicates_numeric_generic_poseidon_inliner_zero 4,450 (-3) -0.07%
regression_4449_inliner_min 4,314 (-3) -0.07%
regression_4449_inliner_max 4,300 (-3) -0.07%
regression_4449_inliner_zero 4,300 (-3) -0.07%
fold_numeric_generic_poseidon_inliner_max 3,762 (-3) -0.08%
no_predicates_numeric_generic_poseidon_inliner_max 3,762 (-3) -0.08%
aes128_encrypt_inliner_min 2,880 (-3) -0.10%
aes128_encrypt_inliner_zero 2,867 (-3) -0.10%
fold_numeric_generic_poseidon_inliner_min 4,687 (-6) -0.13%
no_predicates_numeric_generic_poseidon_inliner_min 4,687 (-6) -0.13%
global_consts_inliner_min 1,413 (-3) -0.21%
global_consts_inliner_max 1,375 (-3) -0.22%
global_consts_inliner_zero 1,375 (-3) -0.22%
aes128_encrypt_inliner_max 2,575 (-6) -0.23%
array_dynamic_nested_blackbox_input_inliner_min 1,192 (-3) -0.25%
array_dynamic_nested_blackbox_input_inliner_max 1,178 (-3) -0.25%
array_dynamic_nested_blackbox_input_inliner_zero 1,178 (-3) -0.25%
array_neq_inliner_min 1,012 (-3) -0.30%
array_eq_inliner_min 1,010 (-3) -0.30%
array_neq_inliner_max 998 (-3) -0.30%
array_neq_inliner_zero 998 (-3) -0.30%
array_eq_inliner_max 996 (-3) -0.30%
array_eq_inliner_zero 996 (-3) -0.30%
conditional_regression_short_circuit_inliner_min 970 (-3) -0.31%
conditional_regression_short_circuit_inliner_max 931 (-3) -0.32%
conditional_regression_short_circuit_inliner_zero 931 (-3) -0.32%
hash_to_field_inliner_min 878 (-3) -0.34%
6_inliner_min 869 (-3) -0.34%
7_inliner_min 866 (-3) -0.35%
blake3_inliner_min 866 (-3) -0.35%
brillig_blake2s_inliner_min 866 (-3) -0.35%
encrypted_log_regression_inliner_min 861 (-3) -0.35%
6_inliner_max 855 (-3) -0.35%
6_inliner_zero 855 (-3) -0.35%
7_inliner_max 852 (-3) -0.35%
blake3_inliner_max 852 (-3) -0.35%
brillig_blake2s_inliner_max 852 (-3) -0.35%
7_inliner_zero 852 (-3) -0.35%
blake3_inliner_zero 852 (-3) -0.35%
brillig_blake2s_inliner_zero 852 (-3) -0.35%
encrypted_log_regression_inliner_max 844 (-3) -0.35%
encrypted_log_regression_inliner_zero 844 (-3) -0.35%
7_function_inliner_max 2,051 (-9) -0.44%
regression_capacity_tracker_inliner_max 565 (-3) -0.53%
regression_capacity_tracker_inliner_min 565 (-3) -0.53%
regression_capacity_tracker_inliner_zero 565 (-3) -0.53%
7_function_inliner_min 2,134 (-12) -0.56%
7_function_inliner_zero 2,120 (-12) -0.56%
poseidon_bn254_hash_width_3_inliner_min 169,944 (-1,188) -0.69%
poseidon_bn254_hash_width_3_inliner_zero 166,595 (-1,188) -0.71%
poseidonsponge_x5_254_inliner_min 186,899 (-1,353) -0.72%
regression_5252_inliner_min 932,943 (-6,762) -0.72%
poseidonsponge_x5_254_inliner_zero 184,994 (-1,353) -0.73%
regression_5252_inliner_zero 921,016 (-6,750) -0.73%
strings_inliner_min 1,570 (-12) -0.76%
strings_inliner_zero 1,556 (-12) -0.77%
references_inliner_min 383 (-3) -0.78%
strings_inliner_max 1,512 (-12) -0.79%
regression_1144_1169_2399_6609_inliner_min 2,529 (-21) -0.82%
poseidon_bn254_hash_width_3_inliner_max 136,183 (-1,188) -0.86%
poseidonsponge_x5_254_inliner_max 151,597 (-1,353) -0.88%
regression_5252_inliner_max 753,534 (-6,750) -0.89%
slice_coercion_inliner_max 327 (-3) -0.91%
slice_coercion_inliner_min 327 (-3) -0.91%
slice_coercion_inliner_zero 327 (-3) -0.91%
regression_1144_1169_2399_6609_inliner_max 2,236 (-21) -0.93%
regression_1144_1169_2399_6609_inliner_zero 2,236 (-21) -0.93%
hint_black_box_inliner_min 850 (-9) -1.05%
hint_black_box_inliner_zero 836 (-9) -1.07%
brillig_cow_inliner_zero 716 (-9) -1.24%
hashmap_inliner_max 50,841 (-669) -1.30%
brillig_cow_inliner_min 1,192 (-18) -1.49%
hint_black_box_inliner_max 578 (-9) -1.53%
tuple_inputs_inliner_min 569 (-9) -1.56%
tuple_inputs_inliner_zero 569 (-9) -1.56%
hashmap_inliner_min 72,209 (-1,143) -1.56%
struct_inputs_inliner_min 556 (-9) -1.59%
struct_inputs_inliner_zero 533 (-9) -1.66%
fold_complex_outputs_inliner_min 706 (-12) -1.67%
tuple_inputs_inliner_max 527 (-9) -1.68%
hashmap_inliner_zero 65,652 (-1,143) -1.71%
struct_inputs_inliner_max 503 (-9) -1.76%
nested_array_dynamic_inliner_min 2,826 (-51) -1.77%
nested_array_dynamic_inliner_zero 2,826 (-51) -1.77%
nested_array_dynamic_inliner_max 2,601 (-48) -1.81%
simple_2d_array_inliner_min 161 (-3) -1.83%
fold_complex_outputs_inliner_zero 633 (-12) -1.86%
brillig_cow_inliner_max 927 (-18) -1.90%
higher_order_functions_inliner_min 1,773 (-39) -2.15%
higher_order_functions_inliner_zero 1,136 (-27) -2.32%
nested_array_in_slice_inliner_min 1,224 (-30) -2.39%
nested_array_in_slice_inliner_zero 1,224 (-30) -2.39%
conditional_1_inliner_min 1,861 (-47) -2.46%
conditional_1_inliner_zero 1,861 (-47) -2.46%
conditional_1_inliner_max 1,835 (-47) -2.50%
side_effects_constrain_array_inliner_min 117 (-3) -2.50%
side_effects_constrain_array_inliner_zero 117 (-3) -2.50%
derive_inliner_min 306 (-9) -2.86%
higher_order_functions_inliner_max 817 (-27) -3.20%
array_rc_regression_7842_inliner_min 170 (-6) -3.41%
mutate_array_copy_inliner_min 169 (-6) -3.43%
derive_inliner_zero 242 (-9) -3.59%
generics_inliner_min 227 (-9) -3.81%
generics_inliner_zero 213 (-9) -4.05%
array_rc_regression_7842_inliner_zero 105 (-6) -5.41%
mutate_array_copy_inliner_zero 105 (-6) -5.41%
slice_regex_inliner_min 3,990 (-393) -8.97%
slice_regex_inliner_zero 3,491 (-387) -9.98%
slice_regex_inliner_max 2,569 (-311) -10.80%
array_sort_inliner_min 874 (-114) -11.54%
array_sort_inliner_max 781 (-114) -12.74%
array_sort_inliner_zero 781 (-114) -12.74%
uhashmap_inliner_min 152,338 (-24,356) -13.78%
uhashmap_inliner_zero 144,420 (-24,360) -14.43%
uhashmap_inliner_max 120,700 (-23,725) -16.43%
slice_loop_inliner_min 927 (-258) -21.77%
slice_loop_inliner_zero 913 (-258) -22.03%
slices_inliner_min 2,844 (-958) -25.20%
slice_loop_inliner_max 609 (-234) -27.76%
array_to_slice_inliner_min 1,388 (-541) -28.05%
slices_inliner_zero 1,946 (-790) -28.87%
slice_dynamic_index_inliner_min 3,372 (-1,434) -29.84%
array_to_slice_inliner_zero 1,257 (-557) -30.71%
slices_inliner_max 1,703 (-790) -31.69%
slice_dynamic_index_inliner_max 2,867 (-1,752) -37.93%
slice_dynamic_index_inliner_zero 2,867 (-1,752) -37.93%
array_to_slice_inliner_max 423 (-530) -55.61%

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: 46b2647 Previous: 9580a12 Ratio
rollup-merge 0.004 s 0.003 s 1.33

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 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 0b56d74 Previous: 9580a12 Ratio
test_report_noir-lang_noir_bigcurve_ 268 s 223 s 1.20
test_report_zkpassport_noir_rsa_ 2 s 1 s 2

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

CC: @TomAFrench

@jfecher jfecher marked this pull request as ready for review June 11, 2025 15:08
@jfecher jfecher requested a review from a team June 11, 2025 15:09
@jfecher
Copy link
Contributor Author

jfecher commented Jun 11, 2025

This PR should be ready for review now, I can't seem to find any bugs with the approach here.

@jfecher jfecher force-pushed the jf/assign-ownership branch from 4455f94 to 46b2647 Compare June 11, 2025 15:23
@jfecher jfecher enabled auto-merge June 11, 2025 18:44
@jfecher jfecher disabled auto-merge June 11, 2025 18:47
@jfecher
Copy link
Contributor Author

jfecher commented Jun 11, 2025

Found a couple of issues with this after thinking of some more cases where the previous value should not be moved. Just checking the loop index is not sufficient since:

for _ in 0 .. 10 {
    foo(bar);
}
for _ in 0 .. 10 {
    bar = &[];
}

In the above example if we just check the loop index, it will be 1 in both cases but we don't want to make foo(bar) a move since on the next iteration we'd be using a moved value.

@jfecher
Copy link
Contributor Author

jfecher commented Jun 12, 2025

Abandoning this work for now to focus more on fixing bugs before 1.0.
This requires more than a day's work to fix it seems since I think we'll need some new tracking structures to track when this optimization is valid since the existing loop_index and branches structures are insufficient.

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.

Reference counters causing vector push back to always copy inside a loop

2 participants