-
Notifications
You must be signed in to change notification settings - Fork 33
Investigate exposing Arrow StringBuilder to numba #2
Comments
What is the use case where we need to the builder in Numba? |
Whenever you want to return an array of strings and don't know what size the result will be. |
Seems like it is not easily possible to call C++ code from Numba. We have a GLib-based C-API in Arrow: https://github.com/apache/arrow/blob/master/c_glib/arrow-glib/array-builder.h#L891 This may be useful here. |
I've looked into it recently: the fletcher's
This comes from the issues with inlining and optimization of numba's Good news is that I'm working on a set of patches which will bring down the runtime of the code above from 400ms to 40ms on my machine, i.e. on par wit this C++ code. The relevant issues are numba/numba#2166, numba/numba#3305. This PR fixes the inlining numba/numba#3531. This PR numba/llvmlite#429 to TL;DR It can take a while, but there is not reason why numba wouldn't be as fast as native C++ for this task. |
@alendit That sounds promising. Thank you for taking a look into this! |
This project has been archived as development has ceased around 2021. |
The numba implementation should be much slower, than arrow's StringBuilder.
Question: what can numba inteface with? The docs mention cffi.
The text was updated successfully, but these errors were encountered: