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

Array copying instructions #191

@tlively

Description

@tlively

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions