pytensor
pytensor copied to clipboard
Faster implementation of Join in C backend
The numpy C-API function has a lot of overhead, as it is made to work with arbitrary types of sequences from Python, plus arguments we don't care about.
Also importantly it doesn't allow one to manage their own buffer, which is useful when we have GC disabled in the C-backend.
I've saw 2x local speedup for small joins (where the copy overhead is smaller and we are bounded by the overhead).
Also simplified the implementation by removing the exotic view_flag, which closes #753
📚 Documentation preview 📚: https://pytensor--1340.org.readthedocs.build/en/1340/