Hacker News new | ask | show | jobs
by true_religion 5519 days 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.

2 comments

Oh, 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.
None of that is available on the GAE, though (you cannot use custom C extensions on GAE, which includes 3rd party tools like numpy).