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