TritonVM / tasm-lib

A collection of functions written in Triton VM assembly (tasm)
Apache License 2.0
11 stars 2 forks source link

Get rid of use of `zip` in FRI verifier #101

Closed Sword-Smith closed 3 months ago

Sword-Smith commented 4 months ago

The latest profile of a verifier execution shows that zip is responsible for 7.2 % of both the opstack table rows and processor table rows. I'm not sure we can get rid of all of the use of zip without changing the FRI verifier return type. But let's see how far we can get. Also consider whether we want to change this interface.

Profile of verifier of inner padded height $2^{20}$, expansion factor 8

tasmlib_verifier_stark_verify:
| Subroutine                                                                                                            |            Processor |             Op Stack |                  RAM |                 Hash |                  U32 |
|:----------------------------------------------------------------------------------------------------------------------|---------------------:|---------------------:|---------------------:|---------------------:|---------------------:|
| tasmlib_verifier_stark_verify                                                                                         |      548550 (100.0%) |      584978 (100.0%) |      367189 (100.0%) |      185089 ( 77.4%) |       92255 (100.0%) |
| ··tasmlib_verifier_claim_instantiate_fiat_shamir_with_claim                                                           |         173 (  0.0%) |         147 (  0.0%) |          13 (  0.0%) |          12 (  0.0%) |          10 (  0.0%) |
| ····tasmlib_hashing_absorb_multiple                                                                                   |         160 (  0.0%) |         136 (  0.0%) |          11 (  0.0%) |          12 (  0.0%) |          10 (  0.0%) |
| ······tasmlib_hashing_absorb_multiple_hash_all_full_chunks                                                            |          17 (  0.0%) |          32 (  0.0%) |          10 (  0.0%) |           6 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_hashing_absorb_multiple_pad_varnum_zeros                                                                |          93 (  0.0%) |          60 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_hashing_absorb_multiple_read_remainder                                                                  |          14 (  0.0%) |           9 (  0.0%) |           1 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ··tasmlib_verifier_vm_proof_iter_dequeue_next_as_log2paddedheight                                                     |          21 (  0.0%) |          16 (  0.0%) |           3 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ··tasmlib_verifier_fri_derive_from_stark_params                                                                       |         219 (  0.0%) |         210 (  0.0%) |           7 (  0.0%) |           0 (  0.0%) |         109 (  0.1%) |
| ····tasmlib_arithmetic_u32_next_power_of_two                                                                          |          22 (  0.0%) |          18 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |          50 (  0.1%) |
| ······tasmlib_arithmetic_u32_next_power_of_two_greater_than_one                                                       |          14 (  0.0%) |          12 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |          28 (  0.0%) |
| ····tasmlib_arithmetic_bfe_primitive_root_of_unity                                                                    |         160 (  0.0%) |         159 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |          33 (  0.0%) |
| ····tasmlib_memory_dyn_malloc                                                                                         |          52 (  0.0%) |          47 (  0.0%) |           6 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_memory_dyn_malloc_initialize                                                                            |           3 (  0.0%) |           2 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ··tasmlib_verifier_vm_proof_iter_dequeue_next_as_merkleroot                                                           |         501 (  0.1%) |         354 (  0.1%) |          30 (  0.0%) |          18 (  0.0%) |           9 (  0.0%) |
| ····tasmlib_hashing_sponge_hasher_pad_and_absorb_all                                                                  |        4362 (  0.8%) |        8322 (  1.4%) |        2755 (  0.8%) |        1662 (  0.7%) |          46 (  0.0%) |
| ······tasmlib_hashing_absorb_multiple                                                                                 |        4314 (  0.8%) |        8298 (  1.4%) |        2747 (  0.7%) |        1662 (  0.7%) |          46 (  0.0%) |
| ········tasmlib_hashing_absorb_multiple_hash_all_full_chunks                                                          |        3268 (  0.6%) |        7564 (  1.3%) |        2690 (  0.7%) |        1614 (  0.7%) |           0 (  0.0%) |
| ········tasmlib_hashing_absorb_multiple_pad_varnum_zeros                                                              |         205 (  0.0%) |         137 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ········tasmlib_hashing_absorb_multiple_read_remainder                                                                |         553 (  0.1%) |         317 (  0.1%) |          57 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ··tasmlib_verifier_challenges_new_generic_dyn_claim_59_4                                                              |        1826 (  0.3%) |        2620 (  0.4%) |         215 (  0.1%) |         108 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_hashing_algebraic_hasher_sample_scalars_static_length_static_pointer_59_18446744060824649728              |         113 (  0.0%) |         398 (  0.1%) |         180 (  0.0%) |         108 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_hashing_squeeze_repeatedly_static_number_18                                                             |         110 (  0.0%) |         397 (  0.1%) |         180 (  0.0%) |         108 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_verifier_eval_arg_compute_terminal_dyn_sized_dynamic_symbols                                              |          84 (  0.0%) |          60 (  0.0%) |           4 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_verifier_eval_arg_compute_terminal_dyn_sized_dynamic_symbols_loop                                       |          42 (  0.0%) |          40 (  0.0%) |           2 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_verifier_eval_arg_compute_terminal_from_digest                                                            |          37 (  0.0%) |          45 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_verifier_eval_arg_compute_terminal_const_sized_static_symbols_symbol_count_256_16790708486107472414       |        1537 (  0.3%) |        2048 (  0.4%) |           0 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ··tasmlib_hashing_algebraic_hasher_sample_scalars_static_length_dyn_malloc_609                                        |        1120 (  0.2%) |        4043 (  0.7%) |        1832 (  0.5%) |        1098 (  0.5%) |           0 (  0.0%) |
| ····tasmlib_hashing_squeeze_repeatedly_static_number_183                                                              |        1100 (  0.2%) |        4027 (  0.7%) |        1830 (  0.5%) |        1098 (  0.5%) |           0 (  0.0%) |
| ··tasmlib_arithmetic_bfe_primitive_root_of_unity                                                                      |         160 (  0.0%) |         159 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |          32 (  0.0%) |
| ··tasmlib_hashing_algebraic_hasher_sample_scalar_one                                                                  |           8 (  0.0%) |          17 (  0.0%) |           0 (  0.0%) |           6 (  0.0%) |           0 (  0.0%) |
| ··tasmlib_verifier_out_of_domain_points                                                                               |          31 (  0.0%) |          33 (  0.0%) |           9 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_arithmetic_xfe_to_the_fourth                                                                              |           9 (  0.0%) |          12 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ··tasmlib_verifier_master_ext_table_quotient_summands                                                                 |       42192 (  7.7%) |       72820 ( 12.4%) |       28242 (  7.7%) |           0 (  0.0%) |          22 (  0.0%) |
| ····tasmlib_verifier_master_ext_table_zerofiers                                                                       |         311 (  0.1%) |         289 (  0.0%) |          15 (  0.0%) |           0 (  0.0%) |          22 (  0.0%) |
| ······tasmlib_arithmetic_xfe_to_the_power_of_power_of_2                                                               |         271 (  0.0%) |         245 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ········tasmlib_arithmetic_xfe_to_the_power_of_power_of_2_loop                                                        |         265 (  0.0%) |         244 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_verifier_master_ext_table_air_constraint_evaluation                                                       |       34564 (  6.3%) |       63999 ( 10.9%) |       22746 (  6.2%) |           0 (  0.0%) |           0 (  0.0%) |
| ··tasmlib_verifier_vm_proof_iter_dequeue_next_as_outofdomainbaserow                                                   |        2938 (  0.5%) |        6328 (  1.1%) |        2206 (  0.6%) |        1320 (  0.6%) |          17 (  0.0%) |
| ··tasmlib_verifier_vm_proof_iter_dequeue_next_as_outofdomainextrow                                                    |         922 (  0.2%) |        1624 (  0.3%) |         526 (  0.1%) |         312 (  0.1%) |          10 (  0.0%) |
| ··tasmlib_verifier_vm_proof_iter_dequeue_next_as_outofdomainquotientsegments                                          |         185 (  0.0%) |         152 (  0.0%) |          17 (  0.0%) |          12 (  0.0%) |          10 (  0.0%) |
| ··tasmlib_array_horner_evaluation_with_4_coefficients                                                                 |          51 (  0.0%) |          65 (  0.0%) |          12 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ··tasmlib_array_inner_product_of_609_xfes                                                                             |         617 (  0.1%) |           5 (  0.0%) |        3654 (  1.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ··tasmlib_hashing_algebraic_hasher_sample_scalars_static_length_dyn_malloc_459                                        |         850 (  0.2%) |        3053 (  0.5%) |        1382 (  0.4%) |         828 (  0.3%) |           0 (  0.0%) |
| ····tasmlib_hashing_squeeze_repeatedly_static_number_138                                                              |         830 (  0.2%) |        3037 (  0.5%) |        1380 (  0.4%) |         828 (  0.3%) |           0 (  0.0%) |
| ··tasmlib_verifier_fri_verify                                                                                         |      318555 ( 58.1%) |      266875 ( 45.6%) |       40080 ( 10.9%) |       92016 ( 38.5%) |       91934 ( 99.7%) |
| ····tasmlib_verifier_fri_number_of_rounds                                                                             |          53 (  0.0%) |          46 (  0.0%) |           3 (  0.0%) |           0 (  0.0%) |          67 (  0.1%) |
| ····tasmlib_list_new___xfe                                                                                            |          23 (  0.0%) |          19 (  0.0%) |           3 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_memory_dyn_malloc                                                                                       |          48 (  0.0%) |          45 (  0.0%) |           6 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_list_new___digest                                                                                         |          23 (  0.0%) |          19 (  0.0%) |           3 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_verifier_vm_proof_iter_dequeue_next_as_merkleroot                                                         |         167 (  0.0%) |         118 (  0.0%) |          10 (  0.0%) |           6 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_hashing_sponge_hasher_pad_and_absorb_all                                                                |         144 (  0.0%) |         101 (  0.0%) |           7 (  0.0%) |           6 (  0.0%) |           0 (  0.0%) |
| ········tasmlib_hashing_absorb_multiple                                                                               |         138 (  0.0%) |          98 (  0.0%) |           6 (  0.0%) |           6 (  0.0%) |           0 (  0.0%) |
| ··········tasmlib_hashing_absorb_multiple_hash_all_full_chunks                                                        |           5 (  0.0%) |           4 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ··········tasmlib_hashing_absorb_multiple_pad_varnum_zeros                                                            |          38 (  0.0%) |          25 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ··········tasmlib_hashing_absorb_multiple_read_remainder                                                              |          59 (  0.0%) |          34 (  0.0%) |           6 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_list_push___digest                                                                                        |          20 (  0.0%) |          20 (  0.0%) |           8 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_verifier_fri_verify_dequeue_commit_phase_remainder                                                        |        3950 (  0.7%) |        3274 (  0.6%) |         660 (  0.2%) |         180 (  0.1%) |           0 (  0.0%) |
| ······tasmlib_hashing_algebraic_hasher_sample_scalars_static_length_dyn_malloc_1                                      |         420 (  0.1%) |         585 (  0.1%) |         180 (  0.0%) |          90 (  0.0%) |           0 (  0.0%) |
| ········tasmlib_memory_dyn_malloc                                                                                     |         592 (  0.1%) |         555 (  0.1%) |          74 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ········tasmlib_hashing_squeeze_repeatedly_static_number_1                                                            |         120 (  0.0%) |         345 (  0.1%) |         150 (  0.0%) |          90 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_list_push___xfe                                                                                         |         300 (  0.1%) |         270 (  0.0%) |          90 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_verifier_vm_proof_iter_dequeue_next_as_merkleroot                                                       |        2505 (  0.5%) |        1770 (  0.3%) |         150 (  0.0%) |          90 (  0.0%) |           0 (  0.0%) |
| ········tasmlib_hashing_sponge_hasher_pad_and_absorb_all                                                              |        2160 (  0.4%) |        1515 (  0.3%) |         105 (  0.0%) |          90 (  0.0%) |           0 (  0.0%) |
| ··········tasmlib_hashing_absorb_multiple                                                                             |        2070 (  0.4%) |        1470 (  0.3%) |          90 (  0.0%) |          90 (  0.0%) |           0 (  0.0%) |
| ············tasmlib_hashing_absorb_multiple_hash_all_full_chunks                                                      |          75 (  0.0%) |          60 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ············tasmlib_hashing_absorb_multiple_pad_varnum_zeros                                                          |         570 (  0.1%) |         375 (  0.1%) |           0 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ············tasmlib_hashing_absorb_multiple_read_remainder                                                            |         885 (  0.2%) |         510 (  0.1%) |          90 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_list_push___digest                                                                                      |         300 (  0.1%) |         300 (  0.1%) |         120 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_verifier_vm_proof_iter_dequeue_next_as_fricodeword                                                        |          27 (  0.0%) |          22 (  0.0%) |           4 (  0.0%) |           0 (  0.0%) |          24 (  0.0%) |
| ····tasmlib_list_higher_order_u32_map_tasmlib_verifier_fri_verify_identity                                            |        7736 (  1.4%) |        8238 (  1.4%) |        3077 (  0.8%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_list_new___xfe                                                                                          |         368 (  0.1%) |         304 (  0.1%) |          48 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_list_higher_order_u32_map_tasmlib_verifier_fri_verify_identity_loop                                     |        7685 (  1.4%) |        8196 (  1.4%) |        3072 (  0.8%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_list_higher_order_u32_map_tasmlib_verifier_fri_verify_convert_xfe_to_digest                               |       10808 (  2.0%) |       10286 (  1.8%) |        4101 (  1.1%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_list_new___digest                                                                                       |          23 (  0.0%) |          19 (  0.0%) |           3 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_list_higher_order_u32_map_tasmlib_verifier_fri_verify_convert_xfe_to_digest_loop                        |       10757 (  2.0%) |       10244 (  1.8%) |        4096 (  1.1%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_list_length___digest                                                                                      |           6 (  0.0%) |           4 (  0.0%) |           2 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_hashing_merkle_root                                                                                       |       37333 (  6.8%) |       31708 (  5.4%) |        2560 (  0.7%) |        3066 (  1.3%) |          66 (  0.1%) |
| ······tasmlib_hashing_merkle_root_else                                                                                |       37314 (  6.8%) |       31696 (  5.4%) |        2560 (  0.7%) |        3066 (  1.3%) |          66 (  0.1%) |
| ········tasmlib_hashing_merkle_root                                                                                   |       37290 (  6.8%) |       31672 (  5.4%) |        2560 (  0.7%) |        3060 (  1.3%) |          52 (  0.1%) |
| ··········tasmlib_hashing_merkle_root_else                                                                            |       37252 (  6.8%) |       31648 (  5.4%) |        2560 (  0.7%) |        3060 (  1.3%) |          52 (  0.1%) |
| ············tasmlib_hashing_merkle_root                                                                               |       37204 (  6.8%) |       31600 (  5.4%) |        2560 (  0.7%) |        3048 (  1.3%) |          42 (  0.0%) |
| ··············tasmlib_hashing_merkle_root_else                                                                        |       37128 (  6.8%) |       31552 (  5.4%) |        2560 (  0.7%) |        3048 (  1.3%) |          42 (  0.0%) |
| ················tasmlib_hashing_merkle_root                                                                           |       37032 (  6.8%) |       31456 (  5.4%) |        2560 (  0.7%) |        3024 (  1.3%) |          33 (  0.0%) |
| ··················tasmlib_hashing_merkle_root_else                                                                    |       36880 (  6.7%) |       31360 (  5.4%) |        2560 (  0.7%) |        3024 (  1.3%) |          33 (  0.0%) |
| ····················tasmlib_hashing_merkle_root                                                                       |       36688 (  6.7%) |       31168 (  5.3%) |        2560 (  0.7%) |        2976 (  1.2%) |          25 (  0.0%) |
| ······················tasmlib_hashing_merkle_root_else                                                                |       36384 (  6.6%) |       30976 (  5.3%) |        2560 (  0.7%) |        2976 (  1.2%) |          25 (  0.0%) |
| ························tasmlib_hashing_merkle_root                                                                   |       36000 (  6.6%) |       30592 (  5.2%) |        2560 (  0.7%) |        2880 (  1.2%) |          18 (  0.0%) |
| ··························tasmlib_hashing_merkle_root_else                                                            |       35392 (  6.5%) |       30208 (  5.2%) |        2560 (  0.7%) |        2880 (  1.2%) |          18 (  0.0%) |
| ····························tasmlib_hashing_merkle_root                                                               |       34624 (  6.3%) |       29440 (  5.0%) |        2560 (  0.7%) |        2688 (  1.1%) |          12 (  0.0%) |
| ······························tasmlib_hashing_merkle_root_else                                                        |       33408 (  6.1%) |       28672 (  4.9%) |        2560 (  0.7%) |        2688 (  1.1%) |          12 (  0.0%) |
| ································tasmlib_hashing_merkle_root                                                           |       31872 (  5.8%) |       27136 (  4.6%) |        2560 (  0.7%) |        2304 (  1.0%) |           7 (  0.0%) |
| ··································tasmlib_hashing_merkle_root_else                                                    |       29440 (  5.4%) |       25600 (  4.4%) |        2560 (  0.7%) |        2304 (  1.0%) |           7 (  0.0%) |
| ····································tasmlib_hashing_merkle_root                                                       |       26368 (  4.8%) |       22528 (  3.9%) |        2560 (  0.7%) |        1536 (  0.6%) |           3 (  0.0%) |
| ······································tasmlib_hashing_merkle_root_else                                                |       21504 (  3.9%) |       19456 (  3.3%) |        2560 (  0.7%) |        1536 (  0.6%) |           3 (  0.0%) |
| ········································tasmlib_hashing_merkle_root                                                   |       15360 (  2.8%) |       13312 (  2.3%) |        2560 (  0.7%) |           0 (  0.0%) |           0 (  0.0%) |
| ··········································tasmlib_hashing_merkle_root_then                                            |        5632 (  1.0%) |        7168 (  1.2%) |        2560 (  0.7%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_list_get_element___digest                                                                                 |          26 (  0.0%) |          30 (  0.0%) |          10 (  0.0%) |           0 (  0.0%) |          12 (  0.0%) |
| ····tasmlib_verifier_vm_proof_iter_dequeue_next_as_fripolynomial                                                      |          55 (  0.0%) |          50 (  0.0%) |           8 (  0.0%) |           0 (  0.0%) |          24 (  0.0%) |
| ····tasmlib_hashing_algebraic_hasher_sample_indices                                                                   |        3282 (  0.6%) |        2361 (  0.4%) |         282 (  0.1%) |          36 (  0.0%) |        3425 (  3.7%) |
| ······tasmlib_list_new___u32                                                                                          |          23 (  0.0%) |          19 (  0.0%) |           3 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_hashing_algebraic_hasher_sample_indices_main_loop                                                       |        3250 (  0.6%) |        2338 (  0.4%) |         279 (  0.1%) |          36 (  0.0%) |        3425 (  3.7%) |
| ········tasmlib_list_length___u32                                                                                     |         201 (  0.0%) |         134 (  0.0%) |          67 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ········tasmlib_hashing_algebraic_hasher_sample_indices_then_reduce_and_save                                          |        1802 (  0.3%) |        1113 (  0.2%) |         212 (  0.1%) |           0 (  0.0%) |        3425 (  3.7%) |
| ··········tasmlib_list_push___u32                                                                                     |         954 (  0.2%) |         742 (  0.1%) |         212 (  0.1%) |           0 (  0.0%) |           0 (  0.0%) |
| ········tasmlib_hashing_algebraic_hasher_sample_indices_else_drop_tip                                                 |          35 (  0.0%) |           7 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_list_length___xfe                                                                                         |           6 (  0.0%) |           4 (  0.0%) |           2 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_hashing_algebraic_hasher_sample_scalars_static_length_dyn_malloc_1                                        |          28 (  0.0%) |          39 (  0.0%) |          12 (  0.0%) |           6 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_hashing_squeeze_repeatedly_static_number_1                                                              |           8 (  0.0%) |          23 (  0.0%) |          10 (  0.0%) |           6 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_list_get_element___xfe                                                                                    |          26 (  0.0%) |          26 (  0.0%) |           6 (  0.0%) |           0 (  0.0%) |           3 (  0.0%) |
| ····tasmlib_list_horner_evaluation_dynamic_length                                                                     |         764 (  0.1%) |        1059 (  0.2%) |         193 (  0.1%) |           0 (  0.0%) |          57 (  0.1%) |
| ······tasmlib_list_length___xfe                                                                                       |           3 (  0.0%) |           2 (  0.0%) |           1 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_list_horner_evaluation_dynamic_length_loop_batches                                                      |         476 (  0.1%) |         712 (  0.1%) |         144 (  0.0%) |           0 (  0.0%) |          57 (  0.1%) |
| ······tasmlib_list_horner_evaluation_dynamic_length_loop_remainder                                                    |         263 (  0.0%) |         326 (  0.1%) |          48 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_verifier_fri_barycentric_evaluation                                                                       |       23241 (  4.2%) |       18621 (  3.2%) |        1537 (  0.4%) |           0 (  0.0%) |          32 (  0.0%) |
| ······tasmlib_arithmetic_bfe_primitive_root_of_unity                                                                  |         160 (  0.0%) |         159 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |          32 (  0.0%) |
| ······tasmlib_verifier_fri_barycentric_evaluation_loop                                                                |       23045 (  4.2%) |       18436 (  3.2%) |        1536 (  0.4%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_verifier_vm_proof_iter_dequeue_next_as_friresponse                                                        |          27 (  0.0%) |          22 (  0.0%) |           4 (  0.0%) |           0 (  0.0%) |          24 (  0.0%) |
| ····tasmlib_list_length___u32                                                                                         |           3 (  0.0%) |           2 (  0.0%) |           1 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_list_higher_order_u32_zip_u32_with_xfe                                                                    |        3207 (  0.6%) |        3333 (  0.6%) |        1290 (  0.4%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_list_new___tuple_Lu32___xfeR                                                                            |          92 (  0.0%) |          76 (  0.0%) |          12 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_list_higher_order_u32_zip_u32_with_xfe_loop                                                             |        3036 (  0.6%) |        3192 (  0.5%) |        1272 (  0.3%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_verifier_verify_authentication_paths_for_leaf_and_index_list                                              |        9361 (  1.7%) |        6595 (  1.1%) |         213 (  0.1%) |        7632 (  3.2%) |           6 (  0.0%) |
| ······tasmlib_verifier_verify_authentication_paths_for_leaf_and_index_list_main_loop                                  |        9333 (  1.7%) |        6576 (  1.1%) |         212 (  0.1%) |        7632 (  3.2%) |           0 (  0.0%) |
| ········tasmlib_verifier_verify_authentication_paths_for_leaf_and_index_list_loop_over_auth_path_elements             |        7897 (  1.4%) |        5300 (  0.9%) |           0 (  0.0%) |        7632 (  3.2%) |           0 (  0.0%) |
| ····tasmlib_verifier_fri_verify_query_phase_main_loop                                                                 |      216193 ( 39.4%) |      178508 ( 30.5%) |       25487 (  6.9%) |       81090 ( 33.9%) |       87604 ( 95.0%) |
| ······tasmlib_list_higher_order_u32_map_tasmlib_verifier_fri_verify_add_half_domain                                   |       18210 (  3.3%) |       13290 (  2.3%) |        1665 (  0.5%) |           0 (  0.0%) |       29716 ( 32.2%) |
| ········tasmlib_list_new___u32                                                                                        |         690 (  0.1%) |         570 (  0.1%) |          90 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ··········tasmlib_memory_dyn_malloc                                                                                   |         720 (  0.1%) |         675 (  0.1%) |          90 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ········tasmlib_list_higher_order_u32_map_tasmlib_verifier_fri_verify_add_half_domain_loop                            |       17565 (  3.2%) |       12780 (  2.2%) |        1590 (  0.4%) |           0 (  0.0%) |       29716 ( 32.2%) |
| ······tasmlib_verifier_vm_proof_iter_dequeue_next_as_friresponse                                                      |         405 (  0.1%) |         330 (  0.1%) |          60 (  0.0%) |           0 (  0.0%) |         336 (  0.4%) |
| ······tasmlib_verifier_fri_verify_populate_return_vector_second_half                                                  |        3682 (  0.7%) |        3454 (  0.6%) |        1067 (  0.3%) |           0 (  0.0%) |         412 (  0.4%) |
| ········tasmlib_list_higher_order_u32_zip_u32_with_xfe                                                                |        1069 (  0.2%) |        1111 (  0.2%) |         430 (  0.1%) |           0 (  0.0%) |           0 (  0.0%) |
| ··········tasmlib_list_new___tuple_Lu32___xfeR                                                                        |          23 (  0.0%) |          19 (  0.0%) |           3 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ············tasmlib_memory_dyn_malloc                                                                                 |          16 (  0.0%) |          15 (  0.0%) |           2 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ··········tasmlib_list_higher_order_u32_zip_u32_with_xfe_loop                                                         |        1012 (  0.2%) |        1064 (  0.2%) |         424 (  0.1%) |           0 (  0.0%) |           0 (  0.0%) |
| ········tasmlib_verifier_fri_verify_populate_return_vector_loop                                                       |        2606 (  0.5%) |        2338 (  0.4%) |         637 (  0.2%) |           0 (  0.0%) |         412 (  0.4%) |
| ··········tasmlib_list_length___u32                                                                                   |         162 (  0.0%) |         108 (  0.0%) |          54 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ··········tasmlib_list_get_element___tuple_Lu32___xfeR                                                                |         689 (  0.1%) |         742 (  0.1%) |         212 (  0.1%) |           0 (  0.0%) |         412 (  0.4%) |
| ··········tasmlib_list_push___tuple_Lu32___xfeR                                                                       |        1060 (  0.2%) |        1007 (  0.2%) |         371 (  0.1%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_list_higher_order_u32_zip_u32_with_xfe                                                                  |       16035 (  2.9%) |       16665 (  2.8%) |        6450 (  1.8%) |           0 (  0.0%) |           0 (  0.0%) |
| ········tasmlib_list_new___tuple_Lu32___xfeR                                                                          |         345 (  0.1%) |         285 (  0.0%) |          45 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ········tasmlib_list_higher_order_u32_zip_u32_with_xfe_loop                                                           |       15180 (  2.8%) |       15960 (  2.7%) |        6360 (  1.7%) |           0 (  0.0%) |           0 (  0.0%) |
| ······tasmlib_list_get_element___digest                                                                               |         195 (  0.0%) |         225 (  0.0%) |          75 (  0.0%) |           0 (  0.0%) |          74 (  0.1%) |
| ······tasmlib_verifier_verify_authentication_paths_for_leaf_and_index_list                                            |      107025 ( 19.5%) |       76665 ( 13.1%) |        3195 (  0.9%) |       81090 ( 33.9%) |          51 (  0.1%) |
| ········tasmlib_verifier_verify_authentication_paths_for_leaf_and_index_list_main_loop                                |      106605 ( 19.4%) |       76380 ( 13.1%) |        3180 (  0.9%) |       81090 ( 33.9%) |           0 (  0.0%) |
| ··········tasmlib_verifier_verify_authentication_paths_for_leaf_and_index_list_loop_over_auth_path_elements           |       85065 ( 15.5%) |       57240 (  9.8%) |           0 (  0.0%) |       81090 ( 33.9%) |           0 (  0.0%) |
| ······tasmlib_list_higher_order_u32_map_tasmlib_verifier_fri_verify_reduce_indices                                    |       16620 (  3.0%) |       11700 (  2.0%) |        1665 (  0.5%) |           0 (  0.0%) |       27736 ( 30.1%) |
| ········tasmlib_list_higher_order_u32_map_tasmlib_verifier_fri_verify_reduce_indices_loop                             |       15975 (  2.9%) |       11190 (  1.9%) |        1590 (  0.4%) |           0 (  0.0%) |       27736 ( 30.1%) |
| ······tasmlib_verifier_fri_verify_compute_c_values_loop                                                               |       51750 (  9.4%) |       54120 (  9.3%) |       11130 (  3.0%) |           0 (  0.0%) |       28949 ( 31.4%) |
| ····tasmlib_list_higher_order_u32_map_tasmlib_verifier_fri_verify_assert_codeword_membership                          |        1964 (  0.4%) |        2272 (  0.4%) |         588 (  0.2%) |           0 (  0.0%) |         485 (  0.5%) |
| ······tasmlib_list_higher_order_u32_map_tasmlib_verifier_fri_verify_assert_codeword_membership_loop                   |        1913 (  0.3%) |        2230 (  0.4%) |         583 (  0.2%) |           0 (  0.0%) |         485 (  0.5%) |
| ········tasmlib_list_get_element___xfe                                                                                |         689 (  0.1%) |         689 (  0.1%) |         159 (  0.0%) |           0 (  0.0%) |         485 (  0.5%) |
| ··tasmlib_verifier_vm_proof_iter_dequeue_next_as_masterbasetablerows                                                  |          27 (  0.0%) |          22 (  0.0%) |           4 (  0.0%) |           0 (  0.0%) |          24 (  0.0%) |
| ··tasmlib_verifier_master_ext_table_verify_Base_table_rows                                                            |       48895 (  8.9%) |      109001 ( 18.6%) |       38908 ( 10.6%) |       39538 ( 16.5%) |           0 (  0.0%) |
| ····tasmlib_verifier_master_ext_table_verify_Base_table_rows_loop_over_rows                                           |       48871 (  8.9%) |      108972 ( 18.6%) |       38902 ( 10.6%) |       39538 ( 16.5%) |           0 (  0.0%) |
| ······tasmlib_hashing_algebraic_hasher_hash_static_size_366                                                           |       29998 (  5.5%) |       96142 ( 16.4%) |       38796 ( 10.6%) |       24274 ( 10.1%) |           0 (  0.0%) |
| ········tasmlib_hashing_absorb_multiple_static_size_366                                                               |       28408 (  5.2%) |       94552 ( 16.2%) |       38796 ( 10.6%) |       23532 (  9.8%) |           0 (  0.0%) |
| ······tasmlib_verifier_master_ext_table_verify_Base_table_rows_loop_over_auth_path_elements                           |       15794 (  2.9%) |       10600 (  1.8%) |           0 (  0.0%) |       15264 (  6.4%) |           0 (  0.0%) |
| ··tasmlib_verifier_vm_proof_iter_dequeue_next_as_authenticationstructure                                              |          54 (  0.0%) |          44 (  0.0%) |           8 (  0.0%) |           0 (  0.0%) |          24 (  0.0%) |
| ··tasmlib_verifier_vm_proof_iter_dequeue_next_as_masterexttablerows                                                   |          27 (  0.0%) |          22 (  0.0%) |           4 (  0.0%) |           0 (  0.0%) |          24 (  0.0%) |
| ··tasmlib_verifier_master_ext_table_verify_Extension_table_rows                                                       |       40521 (  7.4%) |       81017 ( 13.8%) |       27460 (  7.5%) |       32542 ( 13.6%) |           0 (  0.0%) |
| ····tasmlib_verifier_master_ext_table_verify_Extension_table_rows_loop_over_rows                                      |       40497 (  7.4%) |       80988 ( 13.8%) |       27454 (  7.5%) |       32542 ( 13.6%) |           0 (  0.0%) |
| ······tasmlib_hashing_algebraic_hasher_hash_static_size_258                                                           |       21624 (  3.9%) |       68158 ( 11.7%) |       27348 (  7.4%) |       17278 (  7.2%) |           0 (  0.0%) |
| ········tasmlib_hashing_absorb_multiple_static_size_258                                                               |       20034 (  3.7%) |       66568 ( 11.4%) |       27348 (  7.4%) |       16536 (  6.9%) |           0 (  0.0%) |
| ······tasmlib_verifier_master_ext_table_verify_Extension_table_rows_loop_over_auth_path_elements                      |       15794 (  2.9%) |       10600 (  1.8%) |           0 (  0.0%) |       15264 (  6.4%) |           0 (  0.0%) |
| ··tasmlib_verifier_vm_proof_iter_dequeue_next_as_quotientsegmentselements                                             |          27 (  0.0%) |          22 (  0.0%) |           4 (  0.0%) |           0 (  0.0%) |          24 (  0.0%) |
| ··tasmlib_verifier_master_ext_table_verify_Quotient_table_rows                                                        |       23243 (  4.2%) |       19961 (  3.4%) |        1384 (  0.4%) |       17278 (  7.2%) |           0 (  0.0%) |
| ····tasmlib_verifier_master_ext_table_verify_Quotient_table_rows_loop_over_rows                                       |       23219 (  4.2%) |       19932 (  3.4%) |        1378 (  0.4%) |       17278 (  7.2%) |           0 (  0.0%) |
| ······tasmlib_hashing_algebraic_hasher_hash_static_size_12                                                            |        4346 (  0.8%) |        7102 (  1.2%) |        1272 (  0.3%) |        2014 (  0.8%) |           0 (  0.0%) |
| ········tasmlib_hashing_absorb_multiple_static_size_12                                                                |        2756 (  0.5%) |        5512 (  0.9%) |        1272 (  0.3%) |        1272 (  0.5%) |           0 (  0.0%) |
| ······tasmlib_verifier_master_ext_table_verify_Quotient_table_rows_loop_over_auth_path_elements                       |       15794 (  2.9%) |       10600 (  1.8%) |           0 (  0.0%) |       15264 (  6.4%) |           0 (  0.0%) |
| ··tasmlib_array_inner_product_of_three_rows_with_weights_Xfe_baserowelem                                              |         930 (  0.2%) |          12 (  0.0%) |        5424 (  1.5%) |           0 (  0.0%) |           0 (  0.0%) |
| ··tasmlib_array_inner_product_of_4_xfes                                                                               |          12 (  0.0%) |           5 (  0.0%) |          24 (  0.0%) |           0 (  0.0%) |           0 (  0.0%) |
| ··tasmlib_verifier_stark_verify_main_loop                                                                             |       64135 ( 11.7%) |       16116 (  2.8%) |      215710 ( 58.7%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_array_inner_product_of_three_rows_with_weights_Bfe_baserowelem                                            |       49290 (  9.0%) |         636 (  0.1%) |      209880 ( 57.2%) |           0 (  0.0%) |           0 (  0.0%) |
| ····tasmlib_array_inner_product_of_4_xfes                                                                             |        1272 (  0.2%) |         530 (  0.1%) |        2544 (  0.7%) |           0 (  0.0%) |           0 (  0.0%) |
| Total                                                                                                                 |      548554 (100.0%) |      584980 (100.0%) |      367189 (100.0%) |      239287 (100.0%) |       92255 (100.0%) |
Sword-Smith commented 4 months ago

map function calls are another 7.5 % it seems. I wonder if we should also look into that.

One step could be to write a merkle_root snippet for a list of XFEs as opposed to a list of digests and similar specialized snippets.