Skip to content

Commit 75e7eeb

Browse files
committed
signoff!: u64::MulTwoU64sToU128
BREAKING CHANGE: Remove the implementation of `DeprecatedSnippet` for `u64::mul_two_u64s_to_u128::MulTwoU64sToU128`, implement `BasicSnippet` directly.
1 parent 6b30de0 commit 75e7eeb

File tree

3 files changed

+118
-234
lines changed

3 files changed

+118
-234
lines changed

tasm-lib/benchmarks/tasmlib_arithmetic_u64_mul_two_u64s_to_u128_u64.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
{
33
"name": "tasmlib_arithmetic_u64_mul_two_u64s_to_u128_u64",
44
"benchmark_result": {
5-
"clock_cycle_count": 35,
5+
"clock_cycle_count": 34,
66
"hash_table_height": 36,
77
"u32_table_height": 133,
8-
"op_stack_table_height": 22,
8+
"op_stack_table_height": 20,
99
"ram_table_height": 0
1010
},
1111
"case": "CommonCase"
1212
},
1313
{
1414
"name": "tasmlib_arithmetic_u64_mul_two_u64s_to_u128_u64",
1515
"benchmark_result": {
16-
"clock_cycle_count": 35,
16+
"clock_cycle_count": 34,
1717
"hash_table_height": 36,
1818
"u32_table_height": 133,
19-
"op_stack_table_height": 22,
19+
"op_stack_table_height": 20,
2020
"ram_table_height": 0
2121
},
2222
"case": "WorstCase"

tasm-lib/src/arithmetic/u64/and.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,9 @@ pub(crate) mod tests {
9595
}
9696

9797
fn corner_case_args(&self) -> Vec<Self::Args> {
98-
let edge_points = [0, 1 << 32, u64::MAX]
98+
let edge_points = [1, 1 << 32, u64::MAX - 1]
9999
.into_iter()
100-
.flat_map(|p| [p.checked_sub(1), Some(p), p.checked_add(1)])
101-
.flatten();
100+
.flat_map(|p| [p - 1, p, p + 1]);
102101

103102
edge_points.clone().cartesian_product(edge_points).collect()
104103
}

0 commit comments

Comments
 (0)