<a href="https://github.com/pyston/pyston" rel="nofollow">https://github.com/pyston/pyston</a><p>> Pyston is a fork of CPython with additional optimizations for performance. It is targeted at large real-world applications such as web serving, delivering up to a 30% speedup with no development work required.<p>I did not really found any information on what type of additional optimizations are done. Is there some documentation which goes into that?
How does this compare to <a href="https://github.com/facebookincubator/cinder" rel="nofollow">https://github.com/facebookincubator/cinder</a>
How fast is that thing at HTTP serving? For example Python v3.x ThreadedHTTPServer can do 1,000 requests per second for hello world so 30% faster isn't much faster. On the other hand, redbean can do 1,000,000 requests per second on the same machine using a dynamic Lua handler. <a href="https://justine.lol/redbean/index.html" rel="nofollow">https://justine.lol/redbean/index.html</a> redbean was also the top #3 show hn thread of all time. <a href="https://news.ycombinator.com/item?id=26271117" rel="nofollow">https://news.ycombinator.com/item?id=26271117</a> Lua isn't that much different from old Python. I'm also considering integrating js and scheme into redbean too, so people can have options in terms of personal aesthetics and programming taste when they achieve that million qps. For example, Fabrice Bellard's JS engine has already been checked-in to Cosmopolitan and it actually benchmarks faster at ECMAScript test262 than even v8 if I remember correctly.
As a huge Python fan, I think now is the time for the leadership to start thinking about Python 4 (especially since the 2->3 migration headache seems to have mostly gone away).<p>I say this because v4 would be a good time to look at putting some of these speed improvements into the mainline code - something that would be largely backward compatible, but make those breaking changes that give big speedups (such as putting limits on the C interfaces and other big building blocks).<p>My gut (and really, it's just a half-assed guess) tells me that Python could easily see a 2x speedup in exchange for some of those incompatibilities, and an even bigger gain depending on how deep the changes went. [0]<p>If that's anywhere near correct, then doing a v3/v4 in parallel (like v2/v3 was) would probably be the only way to go, so that people would know there is a migration path. [1] [2]<p>[0] - There are really only two ways to do this - keep breaking things and introducing incompatibilities along the way, or make a bigger break for the sake of performance. Of course, doing nothing is also an answer, but probably one that we wouldn't really be happy with. There is also a variant of versioning where we do 4/5/6/... in relatively rapid succession, such as 2-3 year intervals, and make a fewer big breaks for each release, and that might even work better.<p>[1] - I suffered through the v2/v3 issues also, (as an end user more than a dev though), and it wasn't fun. But I'd do it all again if it meant a big jump in speed.<p>[2] - I know the perl team mucked this up (hindsight being 20/20), so having a working V4 on first release (not counting alphas & betas) would be key. Scoping that out well beforehand would probably be needed, but I think the team is broad and deep enough to do that.
Kudos for open-sourcing it. Here’s to hoping some of the changes make their way into upstream CPython.<p>What’s the compatibility story like? Is there a list somewhere of unsupported features?
From 6 months back (v2.0): <a href="https://news.ycombinator.com/item?id=24921790" rel="nofollow">https://news.ycombinator.com/item?id=24921790</a> (262 comments)
There was a different similar post a few days ago
from Facebook and this one stems from Dropbox and
they both are said to make Python code run faster.<p>I think the obsession with monocultures is unhealthy.<p>Python is a great language.
It is reasonably easy to learn, somewhat readable if you dont yet.
It is one of the most popular programming languages on the planet.
But it was not created to produce the fastest code possible.<p>There are other programming languages that are focused on speed.<p>Perhaps for the most critical parts use one of them.
Python can integrate pretty well with C with some magic i hear-
(Never tried it myself).<p>One programming language will never cover all use cases and they
should not have to.<p>Every programing langue is not made to be "functional" but they can
be tortured into it.<p>Every programming language is not object oriented, but they can be tortured
into it.<p>Every programming langue is not focused on being the fastest on execution
but they can be tortured into it.<p>There is a reason carpenters have more than one tool to build something.<p>For the longest time I programmed in C with some C++ mixed into it.
It is a great language. There are many problem domains I would not
recommend using C.<p>I think it was delightful ot pickup Python many years ago.<p>It is great. I can be very productive in Python in contexts were
Python is great.<p>It is not C, it should not want to be.<p>Now I am picking up Elixir, I am learning a lot.
It is neither Python or C and I am happy with that.<p>use proper tool for the job at hand<p>e to <a href="https://github.com/facebookincubator/cinder" rel="nofollow">https://github.com/facebookincubator/cinder</a>
reply
What is the advantage over Nuitka, another Python re-implementation?<p><a href="https://nuitka.net/" rel="nofollow">https://nuitka.net/</a>
How does this play with Cython?<p>I'd assume most performance-sensitive projects will have compiled their hotspot modules with Cython. So how does Pyston work alongside Cython?
I've found this, that says that python is slow because it doesn't have JIT:<p><a href="https://stackoverflow.com/questions/3033329/why-are-python-programs-often-slower-than-the-equivalent-program-written-in-c-or" rel="nofollow">https://stackoverflow.com/questions/3033329/why-are-python-p...</a><p>I'm curious to understand, why is it so hard to write a JIT runtime for python?
Its confusing as to which implementation of Python is appropriate for certain use case or all are just competing with each other ?<p>Someone from python community should write a blogpost about features, merits and limitations of CPython, PyPy, Cinder, GraalVM and Pyston
Does that target Python v2 or v3?<p>Edit: It's Python v3.8.8, thanks to <a href="https://news.ycombinator.com/item?id=27059804" rel="nofollow">https://news.ycombinator.com/item?id=27059804</a>
I just looked at the diffs, the amount of changes seem relatively smaller when looked at commits 024d8058..HEAD<p>They should totally upstream this back to python/cpython.