&gt; The lesson is clear: do not write Python code as you would do in C. Use numpy array operations rather than iterate on arrays. For me it meant a mental shift.<p>That&#x27;s true in C as well. If you&#x27;re writing performance-critical code, you use things like BLAS and LAPACK (possibly even the optimized, often parallel versions supplied by your compiler vendor).