TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Pyston v2.2: faster and open source

272 pointsby chenzheklabout 4 years ago

20 comments

albertzeyerabout 4 years ago
<a href="https:&#x2F;&#x2F;github.com&#x2F;pyston&#x2F;pyston" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pyston&#x2F;pyston</a><p>&gt; 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?
评论 #27062136 未加载
评论 #27063692 未加载
评论 #27060459 未加载
akmittalabout 4 years ago
How does this compare to <a href="https:&#x2F;&#x2F;github.com&#x2F;facebookincubator&#x2F;cinder" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;facebookincubator&#x2F;cinder</a>
评论 #27063476 未加载
评论 #27061126 未加载
评论 #27060940 未加载
评论 #27060324 未加载
jartabout 4 years ago
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&#x27;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:&#x2F;&#x2F;justine.lol&#x2F;redbean&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;justine.lol&#x2F;redbean&#x2F;index.html</a> redbean was also the top #3 show hn thread of all time. <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26271117" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26271117</a> Lua isn&#x27;t that much different from old Python. I&#x27;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&#x27;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.
评论 #27061768 未加载
MR4Dabout 4 years ago
As a huge Python fan, I think now is the time for the leadership to start thinking about Python 4 (especially since the 2-&gt;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&#x27;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&#x27;s anywhere near correct, then doing a v3&#x2F;v4 in parallel (like v2&#x2F;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&#x27;t really be happy with. There is also a variant of versioning where we do 4&#x2F;5&#x2F;6&#x2F;... 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&#x2F;v3 issues also, (as an end user more than a dev though), and it wasn&#x27;t fun. But I&#x27;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&#x2F;20), so having a working V4 on first release (not counting alphas &amp; 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.
评论 #27067368 未加载
评论 #27067891 未加载
评论 #27067536 未加载
syastrovabout 4 years ago
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?
评论 #27060044 未加载
评论 #27063719 未加载
Tempest1981about 4 years ago
From 6 months back (v2.0): <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24921790" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24921790</a> (262 comments)
评论 #27059543 未加载
Ivabout 4 years ago
For people wondering if the version number means something about compatibility with Python 3, it does not: they claim compatibility with Python 3.8.8
评论 #27060310 未加载
ThinkBeatabout 4 years ago
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 &quot;functional&quot; 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:&#x2F;&#x2F;github.com&#x2F;facebookincubator&#x2F;cinder" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;facebookincubator&#x2F;cinder</a> reply
评论 #27070754 未加载
xyprotoabout 4 years ago
What is the advantage over Nuitka, another Python re-implementation?<p><a href="https:&#x2F;&#x2F;nuitka.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;nuitka.net&#x2F;</a>
评论 #27060918 未加载
Radimabout 4 years ago
How does this play with Cython?<p>I&#x27;d assume most performance-sensitive projects will have compiled their hotspot modules with Cython. So how does Pyston work alongside Cython?
评论 #27060928 未加载
评论 #27062169 未加载
评论 #27060575 未加载
jokoonabout 4 years ago
I&#x27;ve found this, that says that python is slow because it doesn&#x27;t have JIT:<p><a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;3033329&#x2F;why-are-python-programs-often-slower-than-the-equivalent-program-written-in-c-or" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;3033329&#x2F;why-are-python-p...</a><p>I&#x27;m curious to understand, why is it so hard to write a JIT runtime for python?
评论 #27061948 未加载
评论 #27060690 未加载
评论 #27060617 未加载
评论 #27061218 未加载
评论 #27060616 未加载
truth_seekerabout 4 years ago
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
评论 #27060955 未加载
评论 #27061008 未加载
mulmboyabout 4 years ago
Hard to argue this wasn&#x27;t precipitated by Instagram&#x27;s Cinder - nice to see it smoking others out already.
评论 #27060404 未加载
评论 #27059786 未加载
forgotpwd16about 4 years ago
Does that target Python v2 or v3?<p>Edit: It&#x27;s Python v3.8.8, thanks to <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27059804" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27059804</a>
评论 #27064582 未加载
vkakuabout 4 years ago
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&#x2F;cpython.
adgjlsfhk1about 4 years ago
What&#x27;s the difference between this and pypy?
评论 #27059393 未加载
评论 #27059661 未加载
moelfabout 4 years ago
AFAIK it doesn&#x27;t play well with popular (read: omnipresence) libraries like Numpy?
评论 #27060179 未加载
评论 #27063860 未加载
nautilus12about 4 years ago
The slowest part of python is imports. Did they fix that? :)
评论 #27063842 未加载
sreeramb93about 4 years ago
is it GIL-free? Web servers are multi-core. Any fork of python should serve requests on all cores like golang and its scheduler does using goroutines.
评论 #27061345 未加载
mrfusionabout 4 years ago
Is this a drop in replacement for cPython?
评论 #27061874 未加载