4 ms·
Currently it's 50x slower than JavaScript ([https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/python.html https://benchmarksgame-team.pages.de
by devit 5y ago
Currently it's 50x slower than JavaScript ([https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/python.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...], look at n-body which is just straightforward math), and apparently they are looking to achieve 2x speedup and maybe 5x later, so not very useful.
- jdowner 5y agoYeah, I doubt it's ever going to catch on.
- hiptobecubic 5y agoOne-liner jokes are frowned upon here, but this was pretty good.
- aix1 5y agoI'd be very interested to see what JAX can do on this problem.
- dekhn 5y agohttps://github.com/google/jax-md https://github.com/google/jax-md
- deleted 5y ago[deleted]
- brokencode 5y ago2x or 5x is very useful if it speeds up common web server applications. A company with 4 servers can run 2 servers with a 2x speedup. Math-heavy benchmarks are not really representative of what Python is used for. They benefit from things like SIMD and aggressive inlining and fine-grained control over memory layout, etc. If you need that with Python, you can use something like NumPy or implement the hot path with a native language.
- vlovich123 5y agoGetting the interpreter to within 5x of a JIT is definitely better than "not very useful".
- yehNonsense0 5y agoAgreed. When newer languages can out perform out of the box, this feels like throwing resources at nostalgia and the personally sacrosanct identity of one retired computer scientist. At the end of the day code is optimized portable machine state for a given task. The syntax is arbitrary. More cynically, Python, Ruby, have hurt as many projects as they’ve helped. Their slowness has wasted countless cycles. Now we can quantify it rather than be lost to the hype we felt learning this “magic” to begin with. With respect, Guido; this feels like a vanity project for a bored retiree, soaking up human effort and real agency. Perhaps you should have simply stayed retired and learn a new hobby.
- dralley 5y agoYou can't cherrypick the worst couple of results on the page and say it's "50x slower" when for most of the other benchmarks it's only 3-5x slower. Yes, tight numerical loops are going to benefit from JIT compilation, this isn't surprising. It's also not a very typical workload for either Python or Javascript.
- IshKebab 5y agoIt is 50 times slower. That matches all my experience. If you look at the "fast" benchmarks they're all just calling into C libraries.
- bjoli 5y agoIf python gets some kind of JIT that kind of loop will fly. Tight loops and unboxed maths is a thing that JITs do really well at.