Enhance Numba with NumPy's string processing features by importing charex:
import charex
char.equal
char.not_equal
char.greater_equal
char.less_equal
char.greater
char.less
char.compare_chararrays
char.count
char.endswith
char.startswith
char.find
char.rfind
char.index
char.rindex
char.str_len
char.isalpha
char.isalnum
char.isspace
char.isdecimal
char.isdigit
char.isnumeric
char.istitle
char.isupper
char.islower
Includes support for UTF-32 strings and ASCII bytes on contiguous arrays of 1-dimension and scalars.
Despite a minor initial overhead from Numba's LLVM initialization, charex
offsets this with increased data scale, outperforming NumPy in handling occurrence and property information.
The benchmarks are generated during testing using charex/tests/test_comparison.py
and charex/tests/test_string_information.py
.
Last tested 2024-02-23: Numba 0.59.0, NumPy 1.26.3