New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allocation free Map.iterator()
and Map.keys()
#8806
Allocation free Map.iterator()
and Map.keys()
#8806
Conversation
Relevant issue: #3147 |
For clarity: |
Is this a (temporary?) workaround for #7379? I don't like that we have to go the weird way for such a basic thing... |
I think for iterating |
I don't have a strong opinion on this one, so I'll let the two of you fight this out. |
I'd like to finish and merge this PR, because I doubt we will get an alternative for |
I don't like this and I'm not sure why I'm assigned to it. As far as I understand something like #9432 will fix the original issue, so IMO it's better to go that way. |
Looking at this again and considering all the possible problems, it's better to not do this. #7379 is still open to track the original problem. |
Ok, not completely free on all targets (e.g. we still need an array for keys on js), but close to that :)
Closes #3147
This branch contains only JS implementation for
Map.iterator
andMap.key
to illustrate the idea.The idea is to move
iterator
andkey
to@:using
.The same approach could be applied to
Map.keyValueIterator()
.Generated JS with current development
Generated JS with this PR