Hacker News new | ask | show | jobs
by matthewmacleod 3276 days ago
Every fanboy says their preferred framework is the simplest, fastest, most scalable and most testable.

That's a way argument though; just because these are metrics on which frameworks are compared does not mean that there is no comparison possible. In fact, I'd say quite the opposite!

And the analogy falls apart when you consider that modern web frameworks are invariably slower or roughly equal in performance to its vanilla JS counterpart, but never faster

What are you measuring? I'll bet that React will be a whole bunch faster than whatever DOM reconciliation library you build up from scraps of vanilla JS, in the process creating your own half-implemented framework (because I'm pretty confident that nobody builds an entire application using copy-and-pasted Javascript.)

In the car analogy the improved performance of modern cars have more to do with mechanical engineering than software

So what? It's irrelevant. Mechanical engineering of a modern car is also much more complex.

1 comments

>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...

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.