, , , Bloom filter .
, (/ ), bisection root-finding.
First of all, I would definitely understand how Python implements dictionary searches, so you are not just reinventing the wheel.
In addition, their implementation in pure Python can be quite slow if it involves many iterations. Consider Cython, Numpy, or F2Py to get true optimization.
(if you are dealing only with country names, then I don’t think that you are dealing with comparisons large enough to justify any of my suggestions), but if you are looking at doing some kind of spell check check then ...
Good luck.
source
share