Initial commit

This commit is contained in:
yuding
2025-12-03 12:00:46 +08:00
commit 5763b764a3
5365 changed files with 1483113 additions and 0 deletions

24
node_modules/alien-signals/benchs/complex.mjs generated vendored Normal file
View File

@@ -0,0 +1,24 @@
import { run, bench, boxplot } from 'mitata';
import { computed, effect, signal } from '../esm/index.mjs';
boxplot(() => {
bench('complex: $w * $h', function* (state) {
const w = state.get('w');
const h = state.get('h');
const src = signal({ w, h });
for (let i = 0; i < w; i++) {
let last = src;
for (let j = 0; j < h; j++) {
const prev = last;
last = computed(() => ({ [`${i}-${j}`]: prev.get() }));
}
effect(() => last.get());
}
yield () => src.set({ upstream: src.get() });
})
.args('h', [1, 10, 100])
.args('w', [1, 10, 100]);
});
run({ format: 'markdown' });