Skip to content

Commit

Permalink
fix: dedup executeHashComputations - hashtree perf test
Browse files Browse the repository at this point in the history
  • Loading branch information
twoeths committed Oct 14, 2024
1 parent 9315119 commit f17019e
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions packages/persistent-merkle-tree/test/perf/hasher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,42 +64,3 @@ describe("hasher", function () {
});
}
});

describe("hashtree", function () {
itBench({
id: `getHashComputations`,
beforeEach: () => {
const [tree] = buildComparisonTrees(16);
return tree;
},
fn: (tree) => {
const hcByLevel: HashComputationLevel[] = [];
getHashComputations(tree, 0, hcByLevel);
},
});

itBench({
id: `executeHashComputations - hashtree`,
beforeEach: () => {
const [tree] = buildComparisonTrees(16);
return tree;
},
fn: (tree) => {
const hcByLevel: HashComputationLevel[] = [];
getHashComputations(tree, 0, hcByLevel);
hashtreeHasher.executeHashComputations(hcByLevel);
},
});

itBench({
id: `root - hashtree`,
beforeEach: () => {
const [tree] = buildComparisonTrees(16);
setHasher(hashtreeHasher);
return tree;
},
fn: (tree) => {
tree.root;
},
});
});

0 comments on commit f17019e

Please sign in to comment.