5 ms·
Wow, this got my attention. I use Python for web application development. A 2-3x speedup would be very interesting for higher-load deployments.
by philpem 5y ago
Wow, this got my attention. I use Python for web application development. A 2-3x speedup would be very interesting for higher-load deployments.
- qeternity 5y agoYou're extremely unlikely to get much, if any, speed up on a large, general codebase. The 2-3x improvements are on specific micro benchmarks.
- BiteCode_dev 5y agoThe best feature of nuitka, and its main goal, is not speed gain. That's the cherry on top. The main goal is getting a standalone executable that works with c extensions.
- synergy20 5y agothat's correct, nuitka is to package python into one single executable, it's an 'installer' per se.
- BiteCode_dev 5y agoNot an installer no. The installer part is not provided, the result is an executable that works out of the box. The installer would then take that and put it somewhere, but you don't need to. It can even work from a USB key.
- antman 5y agoDoes it also package the extensions?
- dec0dedab0de 5y agoif you're just looking to speed things up PyPy, and Cython are both good options
- vips7L 5y agoGraal Python is really fast too, but I'm not sure how it plays with C extensions.
- eatonphil 5y agoIt interprets LLVM bitcode: https://github.com/graalvm/graalvm-ten-things/blob/master/README.md#4-run-native-languages-on-the-jvm https://github.com/graalvm/graalvm-ten-things/blob/master/RE....
- spenczar5 5y agoWhat sort of web applications do you work on where Python interpreter speed is the limiting factor? Usually, those applications are constrained by network throughput and context switches and page faults.
- Eikon 5y agoThis argument is so tiring. That's part of why websites are so slow despite having insane hardware at their disposal. At my company, for a web app we run in production, we strive to get every response out of our infrastructure in under a millisecond, everything above that except for a few select endpoints is considered as a bug. By using sensible technology choices, it's not even that hard to do. A RDMS like postgres can answer to queries in microseconds. Nice bonus, we can provide real time computation features our competitors could only dream of, just by not using dog-slow technology. Our customers are not techies and you know what? When they use our product, the first comment is usually "wow, it's so fast".
- spicybright 5y agoAre you guys hiring? xD Just to expand on your point: Sure you can let a chunk of code take a few seconds longer than it could with little overall effect. But stack a hundred of these up and all those seconds compound and suddenly become immensely important. A suit of armour with a million chinks isn't very effective armour. (As an aside, depending on your use case, it can be worth optimizing the big bottlenecks, high use, computationally expensive, etc. components and not worry too much about the rest)
- thaumasiotes 5y ago> A suit of armour with a million chinks isn't very effective armour. Counterpoint: https://en.wikipedia.org/wiki/Chain_mail https://en.wikipedia.org/wiki/Chain_mail
- spenczar5 5y agoRight, I agree. My question is “what application is constrained by interpreter overhead.” It should be faster than milliseconds for almost any code, I would think. I am agreeing with you, I don’t understand your response.
- takeda 5y agoIf you are interested in speed you might get more from Cython (not to mistake it with CPython) or mypyc. The catch is that you need to specify types (in Cython you otherwise won't get speed gain, and mypyc will refuse to compile). I remember reading an article somebody was describing that instead of even adopting project to work with Cython he/she outright started their project in Cython and found it beneficial.