4 ms·
Have you looked into other Python performance solutions like Cython which lets you add type declarations to Python code, and compile it into a C/C++ module? In
by true_religion 16y ago
Have you looked into other Python performance solutions like Cython which lets you add type declarations to Python code, and compile it into a C/C++ module?
In my tests, it produces speedups on numerics that put it within spitting distance of hand-tuned C.
- gecko 16y agoOh, no question. That's part of why Mercurial is so close to Git in terms of speed, despite Git being hyper-optimized C and Mercurial being Python. But so far, this has always come up when I'm doing one-off, or nearly one-off, stuff. Getting CPython extensions whipped up is more effort, and less fun, than writing the solution in Go.
- cdavid 16y agoNone of that is available on the GAE, though (you cannot use custom C extensions on GAE, which includes 3rd party tools like numpy).