mdgriffith / elm-optimize-level-2

BSD 3-Clause "New" or "Revised" License
129 stars 14 forks source link

Add supportArraysForHtml transformer #108

Open jfmengels opened 1 year ago

jfmengels commented 1 year ago

I ran this on this benchmark and got around a 60% performance increase on Chrome, and a 50% increase on Firefox.

Explanation of the transformer can be found at the top of supportArraysForHtml.ts.

More work can (and probably should) be done to increase the number of places that this transformation applies (doesn't apply to SVG or custom nodes for instance).

I have not yet tested this extensively on a codebase.

The idea for this optimization was pitched to me by @evancz a while ago.