evancz / react-angular-ember-elm-performance-comparison

Comparing performance of Elm, React, Angular, and Ember
BSD 3-Clause "New" or "Revised" License
91 stars 39 forks source link

Angular2 base implementation updated to Beta 17, optimized implementation added #3

Closed IwalkAlone closed 8 years ago

IwalkAlone commented 8 years ago

This updates the angular2 implementation to beta 17 (which improves performance by itself) and applies only the "trackBy" optimization on top of that to get an optimized implementation. (No OnPush parts which didn't meaningfully affect performance, just a single clean change)

Some approximate numbers from my runs on Chrome: beta0 (previous angular-2 impl) - 3000ms beta17, no trackBy (new angular-2 impl) - 2600ms beta17 with trackBy (new angular-2-optimized impl) - 2100ms

evancz commented 8 years ago

Cool, thank you! Based on this, I think it'll make sense to stop using keys in the unoptimized React and Elm versions even though it is a correctness issue without.

I also am going to keep a reference to the version where we added OnPush so it's clear how that compares to lazy in Elm. The fact that you need to change architecture and bring in immutability to get the effect of lazy is important IMO, and it's kind of misleading to hide that.