Skip to content

Todo: Implement buffer protocol #45

@maiself

Description

@maiself

An implementation of the buffer protocol will be needed for fast transfer / direct access of byte and numerical arrays and composite mathematical types.

Currently array transfer creates a shallow copy element by element. While this is fully functional, it's not very performant.

I have notes and possibly a little code towards implementing this, but will have to go searching for it as I don't remember which system or branch contains it.

Care is needed wrt the reference counting and copy-on-write behavior of arrays and memory views. If I remember correctly, a proxy object will be needed to hold a reference, and there is an unlikely but unavailable edge case that leads to segfault that will need a mention in the docs, but I've currently forgotten the details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions