ds300 / derivablejs

Functional Reactive State for JavaScript and TypeScript
Apache License 2.0
515 stars 23 forks source link

docs: add S.js benchmark #119

Open yuanhan1890 opened 6 years ago

yuanhan1890 commented 6 years ago

S.js is incredibly fast for fan_out and waterfall, but slower for other benchmarks. That's interesting.

ryansolid commented 5 years ago

I imagine it is due to S.js being developed along side Surplus a UI rendering library. It was optimized to fit over the DOM. Surplus doesn't use a component system like React to manage change propagation but instead relies on S.js. This leads to more granularity in reactions (there is no Component.render / forceUpdate etc..) and increases the degree of nesting since lacking Components every template context requires its own. This finer granularity reduces the need for diffing but pretty much rides on efficient propagation.