Skip to content
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

I'll try to use the fast path instead of SafeIterator from primordials #6

Open
petamoriken opened this issue May 5, 2023 · 3 comments · May be fixed by #80
Open

I'll try to use the fast path instead of SafeIterator from primordials #6

petamoriken opened this issue May 5, 2023 · 3 comments · May be fixed by #80

Comments

@petamoriken
Copy link
Contributor

petamoriken commented May 5, 2023

I'm reasonably certain it was intentional, and I believe engines are capable of optimizing it when Array.prototype[Symbol.iterator] is unmodified.

tc39/ecma262#827 (comment)

@petamoriken
Copy link
Contributor Author

petamoriken commented May 10, 2023

@petamoriken petamoriken changed the title I'll try to remove SafeIterator from primordials for perf I'll try to use the fast path instead of SafeIterator from primordials May 10, 2023
@petamoriken
Copy link
Contributor Author

This issue should be transferred to the https://github.com/denoland/deno_core

@bartlomieju bartlomieju transferred this issue from denoland/deno Jul 2, 2023
@vimirage
Copy link

vimirage commented Jul 3, 2023

I'm reasonably certain it was intentional, and I believe engines are capable of optimizing it when Array.prototype[Symbol.iterator] is unmodified.

tc39/ecma262#827 (comment)

Yeah but... how is that going to help here in Deno?

It would require that the same V8 mechanism for determining that the ArrayIterator prototype is also unchanged, and that the Array[Symbol.iterator] is the original value.

Worst case it's just additional branching everywhere, and checks that objects are Arrays via Array.isArray...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants