Hacker News new | ask | show | jobs
by daliwali 3274 days ago
>I'll bet that React will be a whole bunch faster than whatever DOM reconciliation library you build up from scraps of vanilla JS

You don't have to bet, you can verify the results yourself. Look here at these benchmarks [0] and compare, Simulacra.js is 22-42% faster than React v15 (depending on whether you also use Redux or MobX). My "scraps of vanilla JS" performs faster! Vanilla without frameworks/libraries is and always will be king of the performance game, though.

[0] http://www.stefankrause.net/js-frameworks-benchmark6/webdriv...

2 comments

Those all seem to be single-widget relatively simple benchmarks.

What happens in an app with multiple views on screen into the same state and multiple pieces of data updating at once is much more interesting.

Remember most of these frameworks are aimed at things that are far more 'web application' than 'web site'.

That describes the DBMon benchmark [0] pretty accurately. It has a hundred "components" (rows), each with several subcomponents that re-render based on state changes.

Actually it is less interesting and indicative of mainly one aspect of web app performance, that is re-rendering. The JS Framework Benchmark gives one a more holistic overview that includes bulk insertion, deletion, swapping, events, startup time, etc.

On this benchmark, Simulacra.js outperforms React by a wider margin.

[0] https://mathieuancelin.github.io/js-repaint-perfs/

Your Simulacra.js is a framework, though. Yes, one framework might be faster than another; that's why there are other tradeoffs.
Simulacra.js is a single function (!), not much of a library, and very far from being a framework.