Sample run on Ubuntu 22.04 LTS [i7-4900MQ CPU @ 2.80GHz/32GB] Chromium 105.0.5195.102
Solid (solid.html
)
Created 205760 nodes.
278 ms; sum: 9.11303444731602e+305
@preact/signals (preactive.html
)
Created 205760 nodes.
415 ms; sum: 9.11303444731602e+305
µsignal (usignal.html
)
252 ms; sum: 9.11303444731602e+305
usignal 0.4.x has async effect so if you want to compare apples with apples you need to use
https://unpkg.com/usignal/esm/async.js?module
as the async version is meant for browsers / DOM.That is:
Te fact computed are lazy has not much to do with this benchmark but if this benchmark reveal an issue with usignal you are welcome to file an issue. I'll have a look at what you expect and what's different in usignal but you should start with updating the comparison using the async version.
edit I’m not sure I understand what I’m looking at … it feels like you are expecting all computed to side effect invokes of other computed so, in that regards, this demo shows usignal doesn’t do that, like the leak test shows it computes 2 times instead of 53 … do you have by any chance a minimal situation that shows usignal fails expectations? Not like debugging loops, you know … thanks.