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: Faster Python

262 pointsby kmodover 4 years ago

29 comments

jedbergover 4 years ago
I&#x27;m not versed in the details of the politics of CPython, but why did this project fork instead of just contributing to CPython? Is CPython really slow in integrating community contributions?<p>Edit: I read the blog post closer, and found this: &quot;Our plan is to open-source the code in the future, but since compiler projects are expensive and we no longer have benevolent corporate sponsorship, it is currently closed-source while we iron out our business model.&quot;
评论 #24923174 未加载
评论 #24922462 未加载
评论 #24923966 未加载
评论 #24922444 未加载
pwinnskiover 4 years ago
I feel like anybody really searching for speed is using something other than Python. I don&#x27;t use Python for speed, but for ease-of-use.<p>It took me some clicks to see it&#x27;s supposed to be a drop-in replacement, so that&#x27;s good.
评论 #24922565 未加载
评论 #24922247 未加载
评论 #24922481 未加载
评论 #24922132 未加载
评论 #24923776 未加载
评论 #24922131 未加载
评论 #24926816 未加载
评论 #24927046 未加载
ihnortonover 4 years ago
&gt; A very-low-overhead JIT using DynASM<p>Interesting. DynASM [1] is the template assembler used in LuaJIT, so it sounds like they might be JIT&#x27;ing CPython bytecode. IIRC this is also what the first version of Pyston did. I&#x27;m curious how this is working out, both implementation and performance-wise compared to LLVM (used in Pyston v1). That could mean there is a lot of performance still on the table, at least for some kinds of code, but also a big complexity jump to get further gains.<p>[1] <a href="https:&#x2F;&#x2F;luajit.org&#x2F;dynasm.html" rel="nofollow">https:&#x2F;&#x2F;luajit.org&#x2F;dynasm.html</a>
评论 #24925479 未加载
theamkover 4 years ago
Wanted to see redistribution rules, and was surprised to see there is no license anywhere for the binaries... The closest thing I found is &quot;copyright&quot; file inside .deb:<p><pre><code> Copyright: 2020 The Pyston Team &lt;support@pyston.org&gt; License: Closed source, all rights reserved. </code></pre> I guess it means no one should be touching the file, as they haven&#x27;t even granted access to run it.
评论 #24927831 未加载
评论 #24928225 未加载
tedunangstover 4 years ago
Everybody should note that the existence of pyston does not prevent <i>you</i> from making cpython or pypy faster if that&#x27;s what you want to happen.
ghjover 4 years ago
I stalked the author&#x27;s linkedin and notice he has competitive programming experience: <a href="https:&#x2F;&#x2F;www.topcoder.com&#x2F;members&#x2F;kmod&#x2F;details&#x2F;?track=DATA_SCIENCE&amp;subTrack=SRM" rel="nofollow">https:&#x2F;&#x2F;www.topcoder.com&#x2F;members&#x2F;kmod&#x2F;details&#x2F;?track=DATA_SC...</a> (and top 15 putnam, ICPC world finals, etc)<p>I wonder if he would be interested in optimizing for purely algorithmic tasks?<p>There are a lot active and successful CPython and PyPy users on <a href="https:&#x2F;&#x2F;atcoder.jp&#x2F;" rel="nofollow">https:&#x2F;&#x2F;atcoder.jp&#x2F;</a>. For example:<p><a href="https:&#x2F;&#x2F;atcoder.jp&#x2F;contests&#x2F;practice2&#x2F;submissions?f.Task=&amp;f.LanguageName=Python&amp;f.Status=AC&amp;f.User=maspy" rel="nofollow">https:&#x2F;&#x2F;atcoder.jp&#x2F;contests&#x2F;practice2&#x2F;submissions?f.Task=&amp;f....</a> (the user &quot;maspy&quot; is rated at 2750 using only cpython!!!)<p><a href="https:&#x2F;&#x2F;atcoder.jp&#x2F;contests&#x2F;practice2&#x2F;submissions?f.Task=&amp;f.LanguageName=PyPy3&amp;f.Status=AC&amp;f.User=" rel="nofollow">https:&#x2F;&#x2F;atcoder.jp&#x2F;contests&#x2F;practice2&#x2F;submissions?f.Task=&amp;f....</a> (though pypy is more practical)<p>I am linking to atcoder because their testing data is public so you can rerun contestants solutions using both pyston&#x2F;cpython&#x2F;pypy for benchmarking purposes: <a href="https:&#x2F;&#x2F;www.dropbox.com&#x2F;sh&#x2F;arnpe0ef5wds8cv&#x2F;AAAk_SECQ2Nc6SVGii3rHX6Fa?dl=0" rel="nofollow">https:&#x2F;&#x2F;www.dropbox.com&#x2F;sh&#x2F;arnpe0ef5wds8cv&#x2F;AAAk_SECQ2Nc6SVGi...</a><p>Right now, other than a handful of people who figured out how to make numba&#x27;s jit work, only pypy is viable for competitive programming. I wonder if you can do better than pypy?<p>There are also a few red coders on codeforces.com who mostly use pypy (cpython is completely unviable there because numpy and numba is not installed)<p><a href="https:&#x2F;&#x2F;codeforces.com&#x2F;submissions&#x2F;pajenegod" rel="nofollow">https:&#x2F;&#x2F;codeforces.com&#x2F;submissions&#x2F;pajenegod</a><p><a href="https:&#x2F;&#x2F;codeforces.com&#x2F;submissions&#x2F;conqueror_of_tourist" rel="nofollow">https:&#x2F;&#x2F;codeforces.com&#x2F;submissions&#x2F;conqueror_of_tourist</a><p>But codeforces&#x27; test cases aren&#x27;t public anyway so it&#x27;s not as relevant.
评论 #24923663 未加载
simonwover 4 years ago
&quot;After the project ended, some of us from the team brainstormed how we would do it differently if we were to do it again. In early 2020, enough pieces were in place for us to start a company and work on Pyston full-time.&quot;<p>I didn&#x27;t know the Pyston team had split off to form their own company! Anyone know who&#x27;s involved, or if they&#x27;ve raised money for it?
评论 #24922616 未加载
acrefootover 4 years ago
It&#x27;s exciting to see this reborn outside of Dropbox!
beervirusover 4 years ago
20% isn&#x27;t nothing... but is it really worth switching to a non-standard, closed-source version of the interpreter?
评论 #24922808 未加载
评论 #24922562 未加载
oscargrouchover 4 years ago
Funny their choice over luajit&#x27;s Dynasm, when you have something like Turbofan laying around.<p>The V8 Javascript interpreter can generate machine code dinamically targetting the host arch for each bytecode instruction..<p>You can define the target assembly directly in C++ without resorting to any specific machine code.<p>Maybe complexity or because they wanted to stick to C?
评论 #24934899 未加载
评论 #24934725 未加载
Animatsover 4 years ago
How about PyPy?
评论 #24922626 未加载
评论 #24922433 未加载
评论 #24922760 未加载
sandGorgonover 4 years ago
Quick question - does pyston use the new PEG parser that cpython does? <a href="https:&#x2F;&#x2F;www.python.org&#x2F;dev&#x2F;peps&#x2F;pep-0617&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.python.org&#x2F;dev&#x2F;peps&#x2F;pep-0617&#x2F;</a><p>Because that&#x27;s a long term risk on subtle differences that may crop up.
nickjjover 4 years ago
If anyone is curious, it is available on the Docker Hub but it seems it&#x27;s a version from 4 years ago based on <a href="https:&#x2F;&#x2F;hub.docker.com&#x2F;r&#x2F;pyston&#x2F;pyston&#x2F;tags" rel="nofollow">https:&#x2F;&#x2F;hub.docker.com&#x2F;r&#x2F;pyston&#x2F;pyston&#x2F;tags</a>.
评论 #24922790 未加载
EdSchoutenover 4 years ago
Not that it&#x27;s necessarily a bad thing, but it looks like the Pyston project isn&#x27;t getting a lot of updates:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;pyston&#x2F;pyston&#x2F;commits&#x2F;v2.0" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pyston&#x2F;pyston&#x2F;commits&#x2F;v2.0</a>
评论 #24925512 未加载
评论 #24922502 未加载
rurbanover 4 years ago
The latest open source repo, I believe, is at <a href="https:&#x2F;&#x2F;github.com&#x2F;jmgc&#x2F;pyston" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jmgc&#x2F;pyston</a> (latest Sep 11) 9f672c1bbb75710ac17dd3d9107da05c8e9e8e8f<p>Maybe someone has something newer.<p>At Oct 28 kevmod deleted all the history.
kzrdudeover 4 years ago
There has been many faster python threads lately, I&#x27;m looking forward to improvements, especially, those that reach CPython!<p>As others have been pouring out before, the new load attr opcache is maybe the most interesting recent performance improvement that was merged.
fastballover 4 years ago
Now we just need a Python implementation re-written in Rust.<p>(only kinda joking)
评论 #24924802 未加载
nickjjover 4 years ago
It&#x27;s really awesome that it&#x27;s not just a speed boost but a drastic decrease in memory usage too.<p>Going from a 230mb Flask app down to 55mb is huge if it&#x27;s really a drop in replacement. If you factor in gunicorn process count, the wins are even higher because if you had 4 gunicorn processes each using 230mb but now they use 55mb, you&#x27;re really going from 920mb down to 220mb of RAM.<p>Edit: This isn&#x27;t true in the end, a brain malfunction mis-read the table thinking PyPy was actually the regular Python interpreter. It would be interesting to see how it compares to the default Python implementation for memory usage tho.
评论 #24923593 未加载
ngcc_hkover 4 years ago
Always go back to python (and c) when in doubt. Problem is graphic user interface. TK, ... or even pythonista scene. So diverse and so non-standard.
person_of_colorover 4 years ago
What does everyone think of just switching to Julia?
mshockwaveover 4 years ago
My last impression on Pyston was that it got killed by Dropbox. Happy to see community efforts still continue on this project
shadykillerover 4 years ago
I read this as Python V2 and thinking why would they make V2 faster than V3 :D
xvilkaover 4 years ago
There is another way. Since Pyston isn&#x27;t generally compatible with the original Python, why not to use faster languages? Go for network services and console tools. Julia for AI applications, data and computational science.
CyberRabbiover 4 years ago
I thought this project was dead. Nice to see it’s alive.
jasonhanselover 4 years ago
Just think: if CPython had been GPL-licensed, this would already be open source (and maybe even merged into upstream).
评论 #24925850 未加载
jonstewartover 4 years ago
What is meant by “quickening”?
评论 #24934559 未加载
The_rationalistover 4 years ago
Interesting to see that it significantly outperform pypy on some metrics, but wouldn&#x27;t have it been better to allocate the human resources towards pypy instead of a duplicated effort?
评论 #24923837 未加载
评论 #24923732 未加载
cbsmithover 4 years ago
Can we talk about the name??<p>Like, if you wanted to create a confusing name, I can&#x27;t think of worse ideas than naming it &quot;v2&quot; for a runtime that is Python <i>3</i> compatible, particularly for a project that has traditionally been Python 2 compatible...
SoSoRoCoCoover 4 years ago
Ugh. At some point we need to stop using side-forks&#x2F;-projects like this because then they become competing standards that pull resources away from the main projects and evolve into their own incompatible beasts. I hope they instead contribute to the main branch, instead of wandering off into NIH land.
评论 #24923147 未加载
评论 #24923051 未加载
评论 #24923312 未加载
评论 #24923029 未加载
评论 #24923185 未加载