Difference between Soild/Signals & Preact/Signals?

Seems the SoildJS/Signals is still alpha (strange since Soild has been around for years), & PreactJS/Signals is now 2.0 Anyone know the performance & DX differences please?
GitHub
GitHub - solidjs/signals
Contribute to solidjs/signals development by creating an account on GitHub.
GitHub
GitHub - preactjs/signals: Manage state with style in every framework
Manage state with style in every framework. Contribute to preactjs/signals development by creating an account on GitHub.
24 Replies
peerreynders
peerreynders2w ago
The signals package is "standalone" and is basically "signals 2.0" in waiting. So for Solid 1.x signals were just buried inside of Solid. Preact signals is a state management library that can be used with React and has been even adopted with Lit and has special opitmizations within Preact to bypass the vDOM and modify DOM properties directly. That said React + 3rd party state management will never be as performant as "just React"; and that is even true for Preact + signals (compared to "just Preact") which still on the whole relies on a vDOM. https://x.com/_developit/status/1877000827186876702 Solid's advantage is that it is a "state library that happens to render"; i.e. signals (and stores) are "performant by default" and in the general case there is no need to get a 3rd party state library involved.
lit.dev
Signals – Lit
Simple. Fast. Web Components.
Jason Miller 🦊⚛ (@_developit) on X
Signals are a direct and ideal solution to this, and they work via context. Context ~= Dependency Injection Signals ~= shared state (why: computeds are lazy, so components that read from signals shared via context only update if+when they actually need to)
Twitter
Ryan Carniato
YouTube
Components Are Pure Overhead
With many starting to look at incorporating Reactivity into existing Frameworks I wanted to take a moment to look at how Frameworks evolved into using Components, the evolution of change and state management, to best understand the impact of where things are going. [0:00] Preamble [12:02] Change Management [40:51] MVC to Components [1:12:34] Th...
peerreynders
peerreynders2w ago
Ryan Carniato
YouTube
Components Are Pure Overhead
With many starting to look at incorporating Reactivity into existing Frameworks I wanted to take a moment to look at how Frameworks evolved into using Components, the evolution of change and state management, to best understand the impact of where things are going. [0:00] Preamble [12:02] Change Management [40:51] MVC to Components [1:12:34] Th...
bigmistqke
bigmistqke2w ago
lol is that a sloid snigal reference?
bigmistqke
bigmistqke2w ago
GitHub
GitHub - transitive-bullshit/ts-reactive-comparison: Comparing the ...
Comparing the most popular TypeScript libs for reactivity / signals, including the TC39 Signals Proposal, Preact, Vue, MobX, Solid, Qwik, etc. - transitive-bullshit/ts-reactive-comparison
bigmistqke
bigmistqke2w ago
GitHub
GitHub - milomg/js-reactivity-benchmark
Contribute to milomg/js-reactivity-benchmark development by creating an account on GitHub.
bigmistqke
bigmistqke2w ago
milo's the architect behind solid's new signal but not sure if solid's signal 2.0 will have the same performance as @reactively
tombyrer
tombyrerOP2w ago
Thanks for the links. Forgot about uSignals, but I'm confused why the 2 performance tests are different? Thanks also @peerreynders . I forgot to mention I was looking at primary stand-alone, but good to know compatibility.
bigmistqke
bigmistqke2w ago
from here
These results are from my fork of @milomg's excellent js-reactivity-benchmark, which aggregates signal benchmarks from several libraries together.
subframe7536
subframe75362w ago
GitHub
GitHub - transitive-bullshit/js-reactivity-benchmark: Benchmark com...
Benchmark comparing different standalone JS reactivity / signals frameworks. - transitive-bullshit/js-reactivity-benchmark
tombyrer
tombyrerOP2w ago
Oh thanks. Interesting results, though I wish he also tested on an x86 CPU instead of an M3, which is like only 1% of JS runtimes. But anyhow, seems that the fastest, alien-signals, may be merged into Vue soon. Though someone else has an interesting counter test. Quite the rabbit hole signals are. 🐇 🕳️ 🗼
GitHub
perf(reactivity): ports alien-signals 0.4.4 by johnsoncodehk · Pu...
alien-signals(https://github.com/stackblitz/alien-signals) is a research-oriented signal library rewritten based on Vue 3.4's reactivity system. It sets several constraints to ensure the hi...
Erik Demaine
Erik Demaine2w ago
@tombyrer Here's what I got from https://github.com/transitive-bullshit/js-reactivity-benchmark on Intel Core i9-14900KF 3.2GHz
No description
Erik Demaine
Erik Demaine2w ago
scaled wider, and computing average instead of sum, it looks pretty similar to the M3 results
No description
Erik Demaine
Erik Demaine2w ago
(Apparently the original plot is made via ChatGPT which seems like a scary way to do a published plot! But seems like it worked out.)
tombyrer
tombyrerOP2w ago
Thanks! Rankings are the same, but notice the jump in i9 between $mol & Preact? & M3 has a jump between Preact & uSignal. Poor SolidJS, in last-ish place still 😢 ah wait a second, or rather, you don't have seconds, you have your test by iterations it seems, but repo is by mSeconds.
Erik Demaine
Erik Demaine2w ago
I think my second plot is msec, or whatever is output by their script, averaged over the test cases. (First plot was sum of tests.) ((I'm not sure that averaging tests is optimal... But seems not terrible.))
tombyrer
tombyrerOP2w ago
CPU Intel(R) i7-13620H 2.40 GHz used DeepSeek to add the columns together, couldn't give me a graphic chart :/
alien-signals: 1,692.89
@reactively: 2,269.09
s-js: 2,654.76
Oby: 3,035.40
Sveltev5: 3,063.93
$mol_wire: 3,318.18
@amadeus-it-group/tans: 3,529.71
SolidJS: 4,281.22
uSignal: 5,089.93
PreactSignals: 5,172.46
Signia: 6,768.24
@vue/reactivity: 7,095.32
MobX: 7,991.88
TC39SignalsPolyfill: 22,089.48
@angular/signals: 24,614.27
alien-signals: 1,692.89
@reactively: 2,269.09
s-js: 2,654.76
Oby: 3,035.40
Sveltev5: 3,063.93
$mol_wire: 3,318.18
@amadeus-it-group/tans: 3,529.71
SolidJS: 4,281.22
uSignal: 5,089.93
PreactSignals: 5,172.46
Signia: 6,768.24
@vue/reactivity: 7,095.32
MobX: 7,991.88
TC39SignalsPolyfill: 22,089.48
@angular/signals: 24,614.27
Note: my test had SolidJS faster than uSignal & Preact. Svelte5 is slower. alien-signals is VERY fast, but has a smaller API.
tombyrer
tombyrerOP7d ago
Side note: don't use AI to sum/avg tables, it is crap. So, using the old-school 'run manytimes, then average in a spreadsheet' test, I tested the new alien-signals v1.0.0 vs prio v0.6.0, seems the rewrite is about 2% slower. But the v1 rewrite is meant to be adapted into other libraries. https://github.com/stackblitz/alien-signals/issues/38
GitHub
Minor performance degradation for v1.0 vs v0.6 · Issue #38 · stackb...
I ran js-reactivity-benchmark your latest v1.0.0 vs v0.6 to see if there was a performance change after your rewrite, & found that that v1.0 is about 1.8% slower. Not that you (should) care, bu...
tombyrer
tombyrerOP7d ago
paging @milo if you want to 'borrow' from alien-signals for Soild2
tombyrer
tombyrerOP4d ago
GitHub
Experiment with building a proposal API on top of alien-signals by ...
This PR is research-based, and we are re-constructing surface APIs based on alien-signals to obtain performance improvements, now faster than most frameworks. We intentionally relies on the alien-s...
milo
milo2d ago
wrong tag I'm not @milomg 😆
milomg
milomg2d ago
fun fact: that test is actually also part of js-reactivity-benchmark (molBench) one of the challenges is figuring out how to weight the different benchmarks... so far they're unweighted which makes averaging a somewhat accidental statistic (if we do decide to average, we should probably do relative slowdown to the fastest library like js-framework-benchmark does)
tombyrer
tombyrerOPthis hour
molBench is like 2 years old; ancient history! 😉 missing are the curent fastest I've averaged 5 I've also took 5 readings, threw out the fastest & slowest, then averaged the middle 3, so kinda means-average.
milomg
milomg21h ago
way older than 2 years, it comes from the test by nin-jin that you linked above
tombyrer
tombyrerOP8h ago
anyhow, maybe look at alien-signals as the Soild2.0 signal engine? v1.0 is a rewrite of their 0.6, so you have a few choices there.

Did you find this page helpful?