Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
5062250
Add tc39 stage 0 proposal
NullVoxPopuli Apr 2, 2024
3176a26
Update name/impl
NullVoxPopuli Apr 2, 2024
36c7b9a
feat: add prettier
transitive-bullshit Sep 13, 2024
8267754
feat: update reactivity lib deps
transitive-bullshit Sep 13, 2024
beb49a0
feat: add more unit tests and fix several bugs
transitive-bullshit Sep 13, 2024
fb86baa
feat: add comments explaining removed tests
transitive-bullshit Sep 13, 2024
2db02d8
feat: add signia framework
transitive-bullshit Sep 13, 2024
c8b55cb
docs: update results in readme
transitive-bullshit Sep 13, 2024
d85303f
docs: update results in readme
transitive-bullshit Sep 13, 2024
5ca140c
docs: update results in readme
transitive-bullshit Sep 13, 2024
74d62c8
docs: update results in readme
transitive-bullshit Sep 13, 2024
6ccdeef
docs: update results in readme
transitive-bullshit Sep 13, 2024
1daae2a
docs: update results in readme
transitive-bullshit Sep 13, 2024
e7b3872
docs: update results in readme
transitive-bullshit Sep 13, 2024
165cac8
docs: update results in readme
transitive-bullshit Sep 13, 2024
f898c3a
docs: update results in readme
transitive-bullshit Sep 13, 2024
c931f71
chore: remove extra debug logs
transitive-bullshit Sep 13, 2024
c5ff95a
feat: add valtio framework
transitive-bullshit Sep 15, 2024
9197a2f
feat: remove v8 native code to further simplify repro cases
transitive-bullshit Sep 15, 2024
0f0855c
feat: replace v8 intrinsics with node --expose-gc; replace pseudorand…
transitive-bullshit Sep 16, 2024
d8215fb
💌
transitive-bullshit Sep 16, 2024
abcdae3
🏎
transitive-bullshit Sep 16, 2024
3ed3e4f
feat: update tests to get them all working reliably
transitive-bullshit Sep 16, 2024
e9eb9c7
feat: fix @vue/reactivity for kairo tests
transitive-bullshit Sep 16, 2024
9c65fd2
👶
transitive-bullshit Sep 16, 2024
c22196a
🎒
transitive-bullshit Sep 16, 2024
29d22d6
docs: update benchmark results
transitive-bullshit Sep 16, 2024
ff8b962
🐶
transitive-bullshit Sep 16, 2024
902b720
transitive-bullshit Sep 16, 2024
0e93a8b
feat: update @vue/reactivity to latest fix
transitive-bullshit Sep 16, 2024
0adc71c
feat: remove warnings for vue issue
transitive-bullshit Sep 16, 2024
fd6d671
🐛
transitive-bullshit Sep 16, 2024
a136d20
feat: re-siable the cellx test suite for mobx
transitive-bullshit Sep 16, 2024
e83c0be
🚅
transitive-bullshit Sep 16, 2024
c501ada
feat: add svelte v5 framework to benchmark
transitive-bullshit Sep 16, 2024
434a77f
Merge pull request #1 from transitive-bullshit/feature/update
transitive-bullshit Sep 16, 2024
99a7ca8
🔲
transitive-bullshit Sep 16, 2024
131f990
feat: fix s.js and improve svelte adapters
transitive-bullshit Sep 17, 2024
5c2d442
transitive-bullshit Sep 17, 2024
924147d
feat: bump svelte
transitive-bullshit Sep 17, 2024
3153341
feat: add github CI
transitive-bullshit Sep 17, 2024
867d515
transitive-bullshit Sep 17, 2024
6300369
fix: bugs with svelte and vue adapters
transitive-bullshit Sep 17, 2024
71223ab
fix: solidjs and svelte
transitive-bullshit Sep 17, 2024
e4a399a
docs: update readme results
transitive-bullshit Sep 17, 2024
db852c5
feat: PR feedback
transitive-bullshit Oct 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/funding.yml

This file was deleted.

19 changes: 11 additions & 8 deletions src/cellxBench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,17 @@ export const cellxbench = (framework: ReactiveFramework) => {
[-3, -6, -2, 2],
[-2, -4, 2, 3],
],
2500: [
[-3, -6, -2, 2],
[-2, -4, 2, 3],
],
5000: [
[2, 4, -1, -6],
[-2, 1, -4, -4],
],
// TODO: https://github.com/milomg/js-reactivity-benchmark/pull/13#issuecomment-2395253701
// @see https://github.com/mobxjs/mobx/issues/3926
// @see https://github.com/sveltejs/svelte/discussions/13277
// 2500: [
// [-3, -6, -2, 2],
// [-2, -4, 2, 3],
// ],
// 5000: [
// [2, 4, -1, -6],
// [-2, 1, -4, -4],
// ],
};

const results: Record<number, BenchmarkResults> = {};
Expand Down
2 changes: 1 addition & 1 deletion src/dynamicBench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { fastestTest } from "./util/benchRepeat";
*/
export async function dynamicBench(
frameworkTest: FrameworkInfo,
testRepeats = 1
testRepeats = 5
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing it back to the original value

): Promise<void> {
const { framework } = frameworkTest;
for (const config of perfTests) {
Expand Down
8 changes: 2 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { dynamicBench } from "./dynamicBench";
// import { cellxbench } from "./cellxBench";
import { cellxbench } from "./cellxBench";
import { sbench } from "./sBench";
import { frameworkInfo } from "./config";
import { logPerfResult, perfReportHeaders } from "./util/perfLogging";
Expand All @@ -8,7 +8,6 @@ import { kairoBench } from "./kairoBench";

async function main() {
logPerfResult(perfReportHeaders());
(globalThis as any).__DEV__ = true;

for (const frameworkTest of frameworkInfo) {
const { framework } = frameworkTest;
Expand All @@ -17,10 +16,7 @@ async function main() {
await molBench(framework);
sbench(framework);

// MobX, Valtio, and Svelte fail this test currently, so disabling it for now.
// @see https://github.com/mobxjs/mobx/issues/3926
// @see https://github.com/sveltejs/svelte/discussions/13277
// cellxbench(framework);
cellxbench(framework);

await dynamicBench(frameworkTest);

Expand Down
4 changes: 2 additions & 2 deletions src/kairo/broad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ export function broadPropagation(bridge: ReactiveFramework) {
bridge.withBatch(() => {
head.write(1);
});
// const atleast = 50 * 50;
const atleast = 50 * 50;
callCounter.count = 0;
for (let i = 0; i < 50; i++) {
bridge.withBatch(() => {
head.write(i);
});
console.assert(last.read() === i + 50);
}
// console.assert(callCounter.count === atleast, callCounter.count);
console.assert(callCounter.count === atleast, callCounter.count);
};
}
4 changes: 2 additions & 2 deletions src/kairo/deep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function deepPropagation(bridge: ReactiveFramework) {
bridge.withBatch(() => {
head.write(1);
});
// const atleast = iter;
const atleast = iter;
callCounter.count = 0;
for (let i = 0; i < iter; i++) {
bridge.withBatch(() => {
Expand All @@ -34,6 +34,6 @@ export function deepPropagation(bridge: ReactiveFramework) {
console.assert(current.read() === len + i);
}

// console.assert(callCounter.count === atleast);
console.assert(callCounter.count === atleast);
};
}
4 changes: 2 additions & 2 deletions src/kairo/diamond.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ export function diamond(bridge: ReactiveFramework) {
head.write(1);
});
console.assert(sum.read() === 2 * width);
// const atleast = 500;
const atleast = 500;
callCounter.count = 0;
for (let i = 0; i < 500; i++) {
bridge.withBatch(() => {
head.write(i);
});
console.assert(sum.read() === (i + 1) * width);
}
// console.assert(callCounter.count === atleast);
console.assert(callCounter.count === atleast);
};
}
4 changes: 2 additions & 2 deletions src/kairo/repeated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ export function repeatedObservers(bridge: ReactiveFramework) {
head.write(1);
});
console.assert(current.read() === size);
// const atleast = 100;
const atleast = 100;
callCounter.count = 0;
for (let i = 0; i < 100; i++) {
bridge.withBatch(() => {
head.write(i);
});
console.assert(current.read() === i * size);
}
// console.assert(callCounter.count === atleast);
console.assert(callCounter.count === atleast);
};
}
4 changes: 2 additions & 2 deletions src/kairo/triangle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ export function triangle(bridge: ReactiveFramework) {
head.write(1);
});
console.assert(sum.read() === constant);
// const atleast = 100;
const atleast = 100;
callCounter.count = 0;
for (let i = 0; i < 100; i++) {
bridge.withBatch(() => {
head.write(i);
});
console.assert(sum.read() === constant - width + i * width);
}
// console.assert(callCounter.count === atleast);
console.assert(callCounter.count === atleast);
};
}

Expand Down
5 changes: 3 additions & 2 deletions src/kairo/unstable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ export function unstable(bridge: ReactiveFramework) {
head.write(1);
});
console.assert(current.read() === 40);
// const atleast = 100;
const atleast = 100;
callCounter.count = 0;
for (let i = 0; i < 100; i++) {
bridge.withBatch(() => {
head.write(i);
});
// TODO: this assertion is failing for Preact Signals (and possibly other frameworks)
// console.assert(current.read() === i % 2 ? i * 2 * 10 : i * -10);
}
// console.assert(callCounter.count === atleast);
console.assert(callCounter.count === atleast);
};
}