Skip to content

Commit 38816b2

Browse files
committed
Add diffAgainst benchmark cases
1 parent 85f229a commit 38816b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

benchmarks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,15 +329,15 @@ console.log("### Delta between B+ trees");
329329
for (let k of makeArray(otherSize, true))
330330
otherTree.set(k, k * 10);
331331

332-
measure(() => `Delta between B+tree with ${size} nodes and B+tree with ${otherSize} nodes`, () => {
332+
measure(() => `Delta between B+ trees with ${size} nodes and B+tree with ${otherSize} nodes`, () => {
333333
tree.diffAgainst(otherTree);
334334
});
335335
}
336336
})
337337

338338
console.log();
339339
sizes.forEach((size, i) => {
340-
for (let j = i; j < sizes.length; j++) {
340+
for (let j = 0; j < sizes.length; j++) {
341341
const otherSize = sizes[j];
342342
const keys = makeArray(size + otherSize, true);
343343
const tree = new BTree();
@@ -348,7 +348,7 @@ console.log("### Delta between B+ trees");
348348
for (let k of keys.slice(size))
349349
tree.set(k, k * 10);
350350

351-
measure(() => `Delta between B+tree with ${size} nodes and cheap cloned B+tree with ${otherSize} additional nodes`, () => {
351+
measure(() => `Delta between B+ trees with ${size} nodes and cheap cloned B+tree with ${otherSize} additional nodes`, () => {
352352
tree.diffAgainst(otherTree);
353353
});
354354
}

0 commit comments

Comments
 (0)