Some people asked for an updated – and there were some interesting updates and contributions, so it’s a good time for a new round of the js web framework benchmark.
- Angular moved to version 4.1
- Polymer reached version 2
- Mithril moved to 1.1
- Marko and Glimmer were added
- as well as a few smaller frameworks: ivi, surplus, rx-domh, Datum, pico-dom, hyperapp, svelte. stemjs and slimjs
- A new benchmark that measures startup duration
- A result table with filtering and sorting – the static table was getting bigger and bigger…
About the benchmark
If this is the first time you look at the benchmarks or you’ve somehow managed to forget about them you can read here what the benchmarks measure.
This link allows you to play with the benchmark in your browser. All benchmarks report some approximate duration on the console. But please note that this is just for fun. The results table’s measurement is as described above.
There are two categories for the measurements, “keyed” and “non-keyed”. Details can be read here, put shortly non-keyed implementations can be faster, because they are allowed to freely choose the fastest way to update the DOM. This may cause problems e.g. with css transitions.
Please note that as with all benchmarks the data should be interpreted carefully. Measurement has some inaccuracy, such that each run varies a bit. We’re reporting the average of 20 runs per benchmark and framework here.
- Some of the “smaller” implementations are incredibly fast like surplus, domvm, ivi and dio and almost beat vanillajs. Still small doesn’t necessarily mean faster than the big ones as Datum, rx-domh, slim and stem show.
- Non-Keyed implementations seem easier to optimise than keyed. In my personal opinion non-keyed updates are a nice addition but I’d only choose a framework if it also supports keyed updates. Please note that the table is not complete regarding the question which modes a framework supports.
- Glimmer improves on embers results, but is still slower than react, angular or vue.js.
- Angular 4.1.2 is a bit faster than 2.4.9 though 4.0 was actually slower.
- Marionette and, although not as bad, Knockout, perform worse than angular.js and may even justify a migration.
- Of the react clones preact lives up to its promise of being a faster react implementation. React-lite fails to deliver that promise. Inferno is extremely fast – at least when a few extra knobs are pushed.
- The startup time row highlight the benefits of smaller frameworks. The cost of adding frameworks can be clearly seen for react. mobx or redux increase startup cost about 30% in comparison to react.
- Vue.js is the fastest of the big three modern frameworks although not by a large margin. It starts faster than both angular and react and shows little weakness.