Skip to content

Commit

Permalink
chore: revert unnecessary change
Browse files Browse the repository at this point in the history
  • Loading branch information
twoeths committed Oct 15, 2024
1 parent 79152c4 commit d03c720
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 27 deletions.
18 changes: 9 additions & 9 deletions packages/ssz/test/perf/byType/listComposite.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,33 @@ describe("ListCompositeType types", () => {
});
}

for (const [i, type] of [containerType, containerNodeStructType].entries()) {
const listType = new ListCompositeType(type, 2 ** 40, {
typeName: `List(${i === 0 ? "Container" : "ContainerNodeStruct"})`,
});
const viewDU = listType.toViewDU(newFilledArray(len, {a: 1, b: 2}));
for (const type of [
new ListCompositeType(containerType, 2 ** 40, {typeName: "List(Container)"}),
new ListCompositeType(containerNodeStructType, 2 ** 40, {typeName: "List(ContainerNodeStruct)"}),
]) {
const viewDU = type.toViewDU(newFilledArray(len, {a: 1, b: 2}));

itBench(`${listType.typeName} len ${len} ViewDU.getAllReadonly() + iterate`, () => {
itBench(`${type.typeName} len ${len} ViewDU.getAllReadonly() + iterate`, () => {
const values = viewDU.getAllReadonly();
for (let i = 0; i < len; i++) {
values[i];
}
});

itBench(`${listType.typeName} len ${len} ViewDU.getAllReadonlyValues() + iterate`, () => {
itBench(`${type.typeName} len ${len} ViewDU.getAllReadonlyValues() + iterate`, () => {
const values = viewDU.getAllReadonlyValues();
for (let i = 0; i < len; i++) {
values[i];
}
});

itBench(`${listType.typeName} len ${len} ViewDU.get(i)`, () => {
itBench(`${type.typeName} len ${len} ViewDU.get(i)`, () => {
for (let i = 0; i < len; i++) {
viewDU.get(i);
}
});

itBench(`${listType.typeName} len ${len} ViewDU.getReadonly(i)`, () => {
itBench(`${type.typeName} len ${len} ViewDU.getReadonly(i)`, () => {
for (let i = 0; i < len; i++) {
viewDU.getReadonly(i);
}
Expand Down
18 changes: 0 additions & 18 deletions packages/ssz/test/unit/load_state.test.ts

This file was deleted.

0 comments on commit d03c720

Please sign in to comment.