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
{{ message }}
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
const transformed = {};
for (const [k, v] of obj) {
transformed[k.toLowerCase()] = v.toLowerCase();
}
"slowly builds up an object". What exactly is slow about this? Do users have performance problems with this? Is there engine implementor feedback that an Object.map function could have substantially improved it? And if yes, would that still be the case for an iterator-based dictionary aggregation solution?
(Just to kick off the discussion. Sorry if these were already brought up in the meeting and the answers will appear in the notes.)
The text was updated successfully, but these errors were encountered:
This is a good point. So my understanding is that when you slowly build up an object, many engines will, under the hood, produce native objects with all the fields you created thus far.
But you definitely make a valid point that the iterator-based approach doesn't help much here. The main reasoning of how Object.map solves this issue is that it makes developer intent more clear and thus allows engines to optimize more easily.
I'm curious to hear from implementors on this. Perhaps introducing something like the toObject method shown in the README would signal to engines that an object is being built from an iterated collection and should thus be optimized slightly differently (avoiding those hidden objects).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The slides suggest that code like
"slowly builds up an object". What exactly is slow about this? Do users have performance problems with this? Is there engine implementor feedback that an
Object.map
function could have substantially improved it? And if yes, would that still be the case for an iterator-based dictionary aggregation solution?(Just to kick off the discussion. Sorry if these were already brought up in the meeting and the answers will appear in the notes.)
The text was updated successfully, but these errors were encountered: