pytensor icon indicating copy to clipboard operation
pytensor copied to clipboard

Faster implementation of Join in C backend

Open ricardoV94 opened this issue 8 months ago • 0 comments

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/

ricardoV94 avatar Apr 01 '25 15:04 ricardoV94