You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use bisect instead of iterating over every offsets.
As the offsets looks already sorted (which looks logical so I assumed
they always are), using a bisection if faster than iterating over all
of them.
On a specific test I encontered, I got nice enhancement with this patch:
$ time python3 ./pycodestyle.py ~/Downloads/PmagPy/PmagPy/coefficients-552K.py > /dev/null
real 1m16.405s
$ time python3 ./pycodestyle.py ~/Downloads/PmagPy/PmagPy/coefficients-552K.py > /dev/null
real 0m3.318s
0 commit comments