Skip to content

Commit 4d55540

Browse files
committed
refactor(AddU64): Implement BasicSnippet
Remove implementation of `DeprecatedSnippet`. Also, use `pick` & `place` over `swap` for marginally more efficient stack manipulation.
1 parent 046afcf commit 4d55540

10 files changed

+140
-314
lines changed

tasm-lib/benchmarks/tasm_lib_mmr_verify_mmr_successor.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
"name": "tasm_lib_mmr_verify_mmr_successor",
44
"benchmark_result": {
5-
"clock_cycle_count": 23555,
6-
"hash_table_height": 3792,
5+
"clock_cycle_count": 23427,
6+
"hash_table_height": 3786,
77
"u32_table_height": 8260,
88
"op_stack_table_height": 14528,
99
"ram_table_height": 473
@@ -13,8 +13,8 @@
1313
{
1414
"name": "tasm_lib_mmr_verify_mmr_successor",
1515
"benchmark_result": {
16-
"clock_cycle_count": 70739,
17-
"hash_table_height": 12342,
16+
"clock_cycle_count": 70491,
17+
"hash_table_height": 12336,
1818
"u32_table_height": 16787,
1919
"op_stack_table_height": 41834,
2020
"ram_table_height": 893

tasm-lib/benchmarks/tasmlib_arithmetic_u64_add.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
{
33
"name": "tasmlib_arithmetic_u64_add",
44
"benchmark_result": {
5-
"clock_cycle_count": 16,
6-
"hash_table_height": 18,
7-
"u32_table_height": 34,
5+
"clock_cycle_count": 14,
6+
"hash_table_height": 12,
7+
"u32_table_height": 66,
88
"op_stack_table_height": 8,
99
"ram_table_height": 0
1010
},
@@ -13,9 +13,9 @@
1313
{
1414
"name": "tasmlib_arithmetic_u64_add",
1515
"benchmark_result": {
16-
"clock_cycle_count": 16,
17-
"hash_table_height": 18,
18-
"u32_table_height": 38,
16+
"clock_cycle_count": 14,
17+
"hash_table_height": 12,
18+
"u32_table_height": 60,
1919
"op_stack_table_height": 8,
2020
"ram_table_height": 0
2121
},

tasm-lib/benchmarks/tasmlib_mmr_calculate_new_peaks_from_leaf_mutation.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"name": "tasmlib_mmr_calculate_new_peaks_from_leaf_mutation",
44
"benchmark_result": {
5-
"clock_cycle_count": 2272,
5+
"clock_cycle_count": 2270,
66
"hash_table_height": 414,
77
"u32_table_height": 1069,
88
"op_stack_table_height": 1462,
@@ -13,7 +13,7 @@
1313
{
1414
"name": "tasmlib_mmr_calculate_new_peaks_from_leaf_mutation",
1515
"benchmark_result": {
16-
"clock_cycle_count": 4332,
16+
"clock_cycle_count": 4330,
1717
"hash_table_height": 600,
1818
"u32_table_height": 1683,
1919
"op_stack_table_height": 2840,

tasm-lib/benchmarks/tasmlib_mmr_leaf_index_to_mt_index_and_peak_index.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
"name": "tasmlib_mmr_leaf_index_to_mt_index_and_peak_index",
44
"benchmark_result": {
5-
"clock_cycle_count": 111,
6-
"hash_table_height": 120,
5+
"clock_cycle_count": 109,
6+
"hash_table_height": 114,
77
"u32_table_height": 298,
88
"op_stack_table_height": 69,
99
"ram_table_height": 0
@@ -13,8 +13,8 @@
1313
{
1414
"name": "tasmlib_mmr_leaf_index_to_mt_index_and_peak_index",
1515
"benchmark_result": {
16-
"clock_cycle_count": 111,
17-
"hash_table_height": 120,
16+
"clock_cycle_count": 109,
17+
"hash_table_height": 114,
1818
"u32_table_height": 326,
1919
"op_stack_table_height": 69,
2020
"ram_table_height": 0

tasm-lib/benchmarks/tasmlib_mmr_verify_from_memory.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"name": "tasmlib_mmr_verify_from_memory",
44
"benchmark_result": {
5-
"clock_cycle_count": 1509,
5+
"clock_cycle_count": 1507,
66
"hash_table_height": 420,
77
"u32_table_height": 1399,
88
"op_stack_table_height": 1172,
@@ -13,7 +13,7 @@
1313
{
1414
"name": "tasmlib_mmr_verify_from_memory",
1515
"benchmark_result": {
16-
"clock_cycle_count": 2856,
16+
"clock_cycle_count": 2854,
1717
"hash_table_height": 606,
1818
"u32_table_height": 1525,
1919
"op_stack_table_height": 2240,

tasm-lib/benchmarks/tasmlib_mmr_verify_from_secret_in_leaf_index_on_stack.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"name": "tasmlib_mmr_verify_from_secret_in_leaf_index_on_stack",
44
"benchmark_result": {
5-
"clock_cycle_count": 1059,
5+
"clock_cycle_count": 1057,
66
"hash_table_height": 360,
77
"u32_table_height": 788,
88
"op_stack_table_height": 570,
@@ -13,7 +13,7 @@
1313
{
1414
"name": "tasmlib_mmr_verify_from_secret_in_leaf_index_on_stack",
1515
"benchmark_result": {
16-
"clock_cycle_count": 1899,
16+
"clock_cycle_count": 1897,
1717
"hash_table_height": 540,
1818
"u32_table_height": 902,
1919
"op_stack_table_height": 990,

tasm-lib/benchmarks/tasmlib_mmr_verify_from_secret_in_secret_leaf_index.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_secret_in_secret_leaf_index",
44
"benchmark_result": {
5-
"clock_cycle_count": 1071,
6-
"hash_table_height": 378,
5+
"clock_cycle_count": 1069,
6+
"hash_table_height": 372,
77
"u32_table_height": 755,
88
"op_stack_table_height": 576,
99
"ram_table_height": 5
@@ -13,8 +13,8 @@
1313
{
1414
"name": "tasmlib_mmr_verify_from_secret_in_secret_leaf_index",
1515
"benchmark_result": {
16-
"clock_cycle_count": 1911,
17-
"hash_table_height": 558,
16+
"clock_cycle_count": 1909,
17+
"hash_table_height": 552,
1818
"u32_table_height": 967,
1919
"op_stack_table_height": 996,
2020
"ram_table_height": 5

0 commit comments

Comments
 (0)