Integer to string conversion is extremely slow #6189
Labels
performance - run time
Performance issue occurring at run time.
performance
performance related issue
Reporting a bug
visible in the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).
to write one see http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports).
Integer to string conversion (
str(int)
) is extremely slow in Numba (~10x slower than Python and ~100x slower than C). The implementation (here) looks very inefficient since it allocates every single produced character. My guess is that someone copied it from CPython, but unlike Numba, CPython has string interning. The integer to string implementation can be much more efficient. Also, SSO (#3965) can avoid these allocations for many string programs in general.The text was updated successfully, but these errors were encountered: