You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought I'd bring this up before it's set in stone. Since React.createElement is intended mostly as a non-user feature as I understand it, wouldn't it make sense to take the opportunity to also change its signature to React.createElement(type, children) to avoid varargs for a potential perf boost.
PS. Hmm, I guess we already support this... by simply providing only an array to children. But it seems that just touching arguments is a significant slow-down (relatively, not necessarily in practice).
createElement isn't only an internal API, we use arrays vs. varargs to distinguish child keys, and I believe these have been benchmarked to be comparable (or even faster with varargs?) so I'm going to close this.
I thought I'd bring this up before it's set in stone. Since
React.createElement
is intended mostly as a non-user feature as I understand it, wouldn't it make sense to take the opportunity to also change its signature toReact.createElement(type, children)
to avoid varargs for a potential perf boost.Non-scientific test: http://jsperf.com/varargs/2
PS. Hmm, I guess we already support this... by simply providing only an array to children. But it seems that just touching
arguments
is a significant slow-down (relatively, not necessarily in practice).cc @sebmarkbage
The text was updated successfully, but these errors were encountered: