Skip to content

Commit b5d874a

Browse files
committed
refactor!: Remove trivial snippets
Migration guide for… - `EqDigest`: `DataType::Digest.compare()` - `ReverseDigest`: `pick 1 pick 2 pick 3 pick 4` - `SwapDigest`: `pick 9 pick 9 pick 9 pick 9 pick 9` - `ToTheFourth`: twice `dup 2 dup 2 dup 2 xx_mul`
1 parent d3d0eee commit b5d874a

15 files changed

+24
-630
lines changed

tasm-lib/benchmarks/tasmlib_mmr_verify_from_memory.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
"name": "tasmlib_mmr_verify_from_memory",
44
"benchmark_result": {
5-
"clock_cycle_count": 1449,
6-
"hash_table_height": 414,
5+
"clock_cycle_count": 1447,
6+
"hash_table_height": 408,
77
"u32_table_height": 1409,
88
"op_stack_table_height": 1164,
99
"ram_table_height": 161
@@ -13,8 +13,8 @@
1313
{
1414
"name": "tasmlib_mmr_verify_from_memory",
1515
"benchmark_result": {
16-
"clock_cycle_count": 2733,
17-
"hash_table_height": 600,
16+
"clock_cycle_count": 2731,
17+
"hash_table_height": 594,
1818
"u32_table_height": 1568,
1919
"op_stack_table_height": 2228,
2020
"ram_table_height": 316

tasm-lib/benchmarks/tasmlib_verifier_out_of_domain_points.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"name": "tasmlib_verifier_out_of_domain_points",
44
"benchmark_result": {
5-
"clock_cycle_count": 33,
5+
"clock_cycle_count": 31,
66
"hash_table_height": 36,
77
"u32_table_height": 0,
88
"op_stack_table_height": 33,
@@ -13,7 +13,7 @@
1313
{
1414
"name": "tasmlib_verifier_out_of_domain_points",
1515
"benchmark_result": {
16-
"clock_cycle_count": 33,
16+
"clock_cycle_count": 31,
1717
"hash_table_height": 36,
1818
"u32_table_height": 0,
1919
"op_stack_table_height": 33,

tasm-lib/benchmarks/tasmlib_verifier_stark_verify_dynamic_inner_padded_height_256_fri_exp_4.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"name": "tasmlib_verifier_stark_verify_dynamic_inner_padded_height_256_fri_exp_4",
44
"benchmark_result": {
5-
"clock_cycle_count": 187680,
5+
"clock_cycle_count": 187678,
66
"hash_table_height": 138835,
77
"u32_table_height": 25449,
88
"op_stack_table_height": 165836,

tasm-lib/benchmarks/tasmlib_verifier_stark_verify_dynamic_inner_padded_height_512_fri_exp_4.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"name": "tasmlib_verifier_stark_verify_dynamic_inner_padded_height_512_fri_exp_4",
44
"benchmark_result": {
5-
"clock_cycle_count": 195184,
5+
"clock_cycle_count": 195182,
66
"hash_table_height": 146527,
77
"u32_table_height": 34071,
88
"op_stack_table_height": 170540,

tasm-lib/benchmarks/tasmlib_verifier_stark_verify_static_inner_padded_height_256_fri_exp_4.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
"name": "tasmlib_verifier_stark_verify_static_inner_padded_height_256_fri_exp_4",
44
"benchmark_result": {
5-
"clock_cycle_count": 175977,
6-
"hash_table_height": 124795,
5+
"clock_cycle_count": 175975,
6+
"hash_table_height": 124789,
77
"u32_table_height": 25449,
88
"op_stack_table_height": 158030,
99
"ram_table_height": 285271

tasm-lib/benchmarks/tasmlib_verifier_stark_verify_static_inner_padded_height_512_fri_exp_4.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
"name": "tasmlib_verifier_stark_verify_static_inner_padded_height_512_fri_exp_4",
44
"benchmark_result": {
5-
"clock_cycle_count": 183481,
6-
"hash_table_height": 132487,
5+
"clock_cycle_count": 183479,
6+
"hash_table_height": 132481,
77
"u32_table_height": 34071,
88
"op_stack_table_height": 162734,
99
"ram_table_height": 286422

tasm-lib/src/arithmetic/xfe.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
pub mod mod_pow_u32_generic;
2-
pub mod to_the_fourth;
32
pub mod to_the_power_of_power_of_2;

tasm-lib/src/arithmetic/xfe/to_the_fourth.rs

Lines changed: 0 additions & 134 deletions
This file was deleted.

tasm-lib/src/exported_snippets.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ pub fn name_to_snippet(fn_name: &str) -> Option<Box<dyn BasicSnippet>> {
7373
)),
7474

7575
// XFieldElement
76-
"tasmlib_arithmetic_xfe_to_the_fourth" => {
77-
Some(Box::new(crate::arithmetic::xfe::to_the_fourth::ToTheFourth))
78-
}
7976
"tasmlib_arithmetic_xfe_to_the_power_of_power_of_2" => Some(Box::new(
8077
crate::arithmetic::xfe::to_the_power_of_power_of_2::ToThePowerOfPowerOf2,
8178
)),
@@ -220,7 +217,6 @@ pub fn name_to_snippet(fn_name: &str) -> Option<Box<dyn BasicSnippet>> {
220217
"tasmlib_hashing_absorb_multiple" => {
221218
Some(Box::new(hashing::absorb_multiple::AbsorbMultiple))
222219
}
223-
"tasmlib_hashing_eq_digest" => Some(Box::new(hashing::eq_digest::EqDigest)),
224220
"tasmlib_hashing_merkle_root" => Some(Box::new(hashing::merkle_root::MerkleRoot)),
225221
"tasmlib_hashing_merkle_root_from_xfes_generic" => Some(Box::new(
226222
hashing::merkle_root_from_xfes_generic::MerkleRootFromXfesGeneric,
@@ -232,8 +228,6 @@ pub fn name_to_snippet(fn_name: &str) -> Option<Box<dyn BasicSnippet>> {
232228
Some(Box::new(hashing::merkle_step_u64_index::MerkleStepU64Index))
233229
}
234230
"tasmlib_hashing_merkle_verify" => Some(Box::new(hashing::merkle_verify::MerkleVerify)),
235-
"tasmlib_hashing_reverse_digest" => Some(Box::new(hashing::reverse_digest::ReverseDigest)),
236-
"tasmlib_hashing_swap_digest" => Some(Box::new(hashing::swap_digest::SwapDigest)),
237231

238232
// Hashing -> algebraic hasher trait
239233
"tasmlib_hashing_algebraic_hasher_hash_varlen" => {

tasm-lib/src/hashing.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
pub mod absorb_multiple;
22
pub mod absorb_multiple_static_size;
33
pub mod algebraic_hasher;
4-
pub mod eq_digest;
54
pub mod hash_from_stack;
65
pub mod lt_digest;
76
pub mod merkle_root;
87
pub mod merkle_root_from_xfes_generic;
98
pub mod merkle_step_mem_u64_index;
109
pub mod merkle_step_u64_index;
1110
pub mod merkle_verify;
12-
pub mod reverse_digest;
1311
pub mod sponge_hasher;
1412
pub mod squeeze_repeatedly;
1513
pub mod squeeze_repeatedly_static_number;
16-
pub mod swap_digest;

0 commit comments

Comments
 (0)