I like Numba, but it&#x27;s sometimes jarring writing C-like code in a language which almost explicitly advises against it. Once you get into the habit of &quot;FOR LOOP BAD&quot; it&#x27;s difficult to get out of!<p>It&#x27;s interesting seeing what the effect of Big-O is. Once you introduce a logarithmic solution, it doesn&#x27;t really matter that you&#x27;re using Python because it&#x27;s asymptotically so much better than the n^2 brute force approach. Nearest neighbour is a particularly nice demonstration of this, because it&#x27;s an algorithm which is frequently used in realtime and obviously you don&#x27;t want a performance hit of 2 seconds for every query!<p>Note Numpy has a builtin np.radians() which is a little cleaner than a one value look up table.<p>In [2]: %timeit np.random.random((10000))*3.14
1000 loops, best of 3: 245 µs per loop<p>In [3]: %timeit np.radians(np.random.random((10000)))
1000 loops, best of 3: 262 µs per loop