Skip to content

[Feature] - Support zero copy arrays for ORCJITv2 symbol arrays #234

@smaillet

Description

@smaillet

Is your feature request related to a problem? Please describe.
ORCJitv2 is designed to allow creation and passing of arrays of structures as a pointer+length directly. But the current managed wrapper layering and (NO leakage of the "interop" namespace) causes a conflict whereby a copy of the structures is made. This is the sort performance overhead this library is trying to avoid.

Describe the solution you'd like
The Managed wrapper structures are layout compatible with the underlying native interop (Verifiable in testing). Thus, NO copy is required.

Describe alternatives you've considered
Continue on with the "copy" as a perf hit for marshalling.

Additional context
It would be a good thing to reduce overhead of the various symbol arrays KvpArrayBuilder<k,v> is already in place to optimize the construction of such.

NOTE: This gets very tricky with respect to ownership of the SymbolStringPoolEntry as the LLVM code assumes ownership of the EXISTING ref count and therefore the caller should NOT release that ref count. But that behavior, without some form of inherent "move" support leads to dangling refs or worse pre-mature release.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions