$ python bm_pure.py "AT THAT" test_1.txt
Matches:
File: test_1.txt, index: 25
Just did this comparison to get familiar with Cython.
Pure:
$ time for i in {1..1000}; do python bm_pure.py "AT THAT" test_1.txt>/dev/null; done
real 0m33.114s
user 0m26.745s
sys 0m6.417s
Cython:
First, build the C extension using:
$ python cython_setup.py build_ext --inplace
Then,
$ time for i in {1..1000}; do python bm_cython_cli.py "AT THAT" test_1.txt >/dev/null; done
real 0m32.663s
user 0m26.276s
sys 0m6.432s