refactor: rewrite untracked, update alien-signals

This commit is contained in:
littensy 2025-09-23 16:50:39 -07:00
parent a8051257e5
commit cb52ece4d3
15 changed files with 239 additions and 114 deletions

View file

@ -4,6 +4,7 @@ local bench = require("./bench")
local atom = Charm.atom
local computed = Charm.computed
local effect = Charm.effect
local listen = Charm.listen
for _, w in { 10, 100 } do
for _, h in { 10, 100 } do
@ -25,3 +26,22 @@ for _, w in { 10, 100 } do
end)
end
end
for _, w in { 10, 100 } do
for _, h in { 10, 100 } do
bench.run(`propagate (listen) {w}*{h}`, function()
local src = atom(1)
for _ = 1, w do
local last = src
for _ = 1, h do
local prev = last
last = computed(function()
return prev() + 1
end)
end
listen(last, function() end)
end
src(src() + 1)
end)
end
end