Skip to content

Dual dataline optimization #487

Description

@robambalu

This is an optimization idea to avoid python boxing / unboxing overhead. TBD if there are any issues to actually implement this

The idea is to hold native ( C++ ) and dialect specific ( PyObjectPtr for python ) version of data in the dataline. c++ adapters would only set native data, upon access of the data we would check if dialect specific is valid if not we convert once and update.

Similarly for python outputs, we would only set the dialect value. If a c++ node or c++ adapter needs to access the value, we convert to c++ once if invalid.

Some technical notes:

to be generic for other dialects, and to avoid dialect specific compilation issues, the dialect version would be stored as a raw void *
in order to flag native values as valid or not without introducing a separate bitmask, we can use the low order bit of the void * dialect pointer
for dialects that can read native types natively ( ie c# ) they should be able to avoid accessing dialect side for such types

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tag: internalIssues and PRs for maintainance of the project - not interesting to external userstype: enhancementIssues and PRs related to improvements to existing features

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions