12 ms·
Shameless plug: Python 3.11 comes out this October and is slated to be 10-20% faster, but Pyston is already available and is 30% faster. We do the things that a
by kmod 5y ago
Shameless plug: Python 3.11 comes out this October and is slated to be 10-20% faster, but Pyston is already available and is 30% faster. We do the things that are listed in this pdf, but also additional things that will probably never make it into mainline Python (such as adding a JIT)
https://github.com/pyston/pyston https://github.com/pyston/pyston
- dataflow 5y agoDo you know when you might have Windows support? Since one of the main strengths of Python is its cross-platform support, but for Pyston I only seem to see Linux support.
- cuteboy19 5y agoWhy won't JIT compilation make it to Python? Are the reasons technical or political?
- bjourne 5y agoHigh-speed JITs are complicated and the CPython code base is meant to be kept simple. If you want JITted Python use PyPy (or JAX which is a JIT for tensor computation).
- fault1 5y agoGuido seems quite anti-JIT.
- Jasper_ 5y agoThe current CPython maintainers believe that a JIT would be far too much complexity to maintain, and would drive away new contributors. I don't agree with their analysis; I would argue the bigger thing driving new contributors away is them actively doing so. People show up all the time with basic patches for things other language runtimes have been doing for 20+ years and get roasted alive for daring to suggest something as arcane as method dispatch caches. The horror! This cements the CPython team as sort of a known "don't waste your time there" in PL research communities, distancing themselves from the people most likely and willing to help maintain their runtime.
- ctoth 5y agoSo glad somebody finally said this. I've noticed this dynamic for years and it really is sad to watch. I remember reading over the community reviewing a large patchset someone had contributed a couple months ago and the amount of negativity was remarkable.
- hadcomplained 5y agoWould you mind telling me exactly which patchset you are referring to?
- wswope 5y agoNot OP but probably this one: https://news.ycombinator.com/item?id=28896367 https://news.ycombinator.com/item?id=28896367.
- staticassertion 5y agoI had one conversation with Guido at Dropbox where I wanted to get a dependency updated so that I could write quickcheck tests. It was like pulling teeth - he didn't know what property testing was ("some haskell thing?" - his words) and so he wouldn't update it ("are you implying that how Dropbox writes tests today isn't good enough?" - his words), so I couldn't write generated tests. Sort of ironically, property testing was used elsewhere in the company to great success, and in fact we were all told the scary story of the 1 hour where empty passwords let anyone log into any account - a bug that a proeprty test is very well designed for. I walked away pretty embarrassed for him and decided I wasn't interested in further interaction.
- jslaby 5y agoIsn't it really a "haskell thing", though? Generated testing of properties seems a bit overkill, but I might be mistaken about how that actually works.
- staticassertion 5y ago
- i80and 5y agoI just want to toss out that Pyston actually gives a solid 2x speedup on my Python project. You've done amazing work. Thank you!
- deleted 5y ago[deleted]
- edgyquant 5y agoI respect your work here but CPython already has a roadmap and people paid to work on getting the experimental JIT into python in the next few releases.
- yjftsjthsd-h 5y agoOkay, so what's the catch? I see no Windows support and no ABI compatibility, but other than that it's just... a drop in replacement and I get a 30% speedup? I'm aware that "too good to be true" is only a heuristic, but it generally holds; am I missing some great caveat?
- O5vYtytb 5y agoNo abi compat is a big one. But if your writing pure python go for it.
- yjftsjthsd-h 5y agoHonestly, even that seems trivial? By my reading of https://github.com/pyston/pyston#installing-packages https://github.com/pyston/pyston#installing-packages , the only impact is that when you install (compiled) libraries they need to be recompiled, just like if you use Alpine (which is also ABI-incompatible because it uses musl libc), which is a little bit of pain at build/packaging time but doesn't actually break anything (i.e. there are no libraries that you can't use, just libraries with an extra compile step) and doesn't affect runtime behavior at all. EDIT: I should caveat "doesn't actually break anything" with "although it does require you to install build dependencies because you have to compile the package from source instead of using a prebuilt wheel". I don't think this changes the substance of my comment but best to be precise.
- kanaffa12345 5y ago