-
Notifications
You must be signed in to change notification settings - Fork 6
Description
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.