Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Array copying instructions #191

Closed
tlively opened this issue Feb 3, 2021 · 1 comment
Closed

Array copying instructions #191

tlively opened this issue Feb 3, 2021 · 1 comment

Comments

@tlively
Copy link
Member

tlively commented Feb 3, 2021

The J2CL team asked whether there were plans for bulk-memory-like operations for arrays because they expect engines to be able to copy arrays faster than could be done in userspace. There is prior art in that Java's System.arraycopy is implemented as a native method:

https://github.com/AdoptOpenJDK/openjdk-jdk11/blob/19fb8f93c59dfd791f62d41f332db9e306bc1422/src/hotspot/share/prims/jvm.cpp#L322-L335

https://github.com/AdoptOpenJDK/openjdk-jdk11/blob/19fb8f93c59dfd791f62d41f332db9e306bc1422/src/hotspot/share/oops/typeArrayKlass.cpp#L125-L191

I am not aware of previous issues proposing this kind of instruction. It would be interesting to see how big the performance differences would be for large arrays, although this also seems like a good candidate for a follow-on proposal.

@tlively
Copy link
Member Author

tlively commented Feb 22, 2022

Closing this in light of #278

@tlively tlively closed this as completed Feb 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant