Skip to content

Commit

Permalink
Merge 4e3b2eb into 992d85a
Browse files Browse the repository at this point in the history
  • Loading branch information
mnasyrov committed Mar 13, 2023
2 parents 992d85a + 4e3b2eb commit 9a43f6a
Show file tree
Hide file tree
Showing 8 changed files with 225 additions and 557 deletions.
22 changes: 1 addition & 21 deletions packages/rx-effects/benchmarks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const ITERATION_COUNT = 100;

const bench = new Bench();

bench.add('reactive-computed-bench (implicit)', () => {
bench.add('reactive-computed-bench', () => {
const entry = createStore(0);

const a = compute((get) => get(entry));
Expand All @@ -25,26 +25,6 @@ bench.add('reactive-computed-bench (implicit)', () => {
}
});

bench.add('reactive-computed-bench (explicit)', () => {
const entry = createStore(0);

const a = compute(() => entry.get(), [entry]);
const b = compute(() => a.get() + 1, [a]);
const c = compute(() => a.get() + 1, [a]);
const d = compute(() => b.get() + c.get(), [b, c]);
const e = compute(() => d.get() + 1, [d]);
const f = compute(() => d.get() + e.get(), [d, e]);
const g = compute(() => d.get() + e.get(), [d, e]);
const h = compute(() => f.get() + g.get(), [f, g]);

h.value$.subscribe();

for (let i = 0; i < ITERATION_COUNT; i++) {
entry.set(i);
entry.notify();
}
});

async function main() {
await bench.run();

Expand Down
Loading

0 comments on commit 9a43f6a

Please sign in to comment.