- Notifications
You must be signed in to change notification settings - Fork6k
Use toArray instead of toTypedArray in ArrayDeque#5467
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
`toArray` is much faster than `toTypedArray` on JVM. And we don't need a typed array here.
There's no public Please make sure that code compiles and tests pass (you can execute the Performance-related changes, in general, have to be accompanied by benchmarks showing performance difference before and after changes. For changes affecting multiple targets, performance needs to be evaluated for all these targets. |
@fzhinkin Hi! I have a problem on this. Because the |
@MukjepScarlet, in theory, you can introduce an expect function and actualize it differently depending on a platform. But before doing that, it worth ensuring that all these efforts would actually result in a better performance (by writing and running benchmarks). |
toArray
is much faster thantoTypedArray
on JVM. And we don't need a typed array here.