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.

Faster CPython Ideas – Issue Tracker for Faster CPython Project

226 pointsby patrick91about 4 years ago

17 comments

patrick91about 4 years ago
Presentation from Guido van Rossum at the Python Language Summit: <a href="https:&#x2F;&#x2F;github.com&#x2F;faster-cpython&#x2F;ideas&#x2F;blob&#x2F;main&#x2F;FasterCPythonDark.pdf" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;faster-cpython&#x2F;ideas&#x2F;blob&#x2F;main&#x2F;FasterCPyt...</a>
评论 #27140684 未加载
评论 #27145456 未加载
etaioinshrdluabout 4 years ago
I updated a large Django project from python2.7 to 3.9 recently. Afterward, I was pleased that the app was both faster and used less than half the memory. It was somewhat surprising that the new version was so much better - most software seems to typically get only heavier over time!<p>So, I take this as a good sign that progress will continue.
评论 #27143567 未加载
评论 #27149326 未加载
kzrdudeabout 4 years ago
This is exciting! So that we don&#x27;t miss the main point: Eric Snow, GvR and Mark Shannon will be working for Microsoft to improve Python performance.<p>In a way, it seems like Mark Shannon found someone to take him up on his offer on a plan for speeding up Python.
评论 #27141256 未加载
评论 #27141223 未加载
pca006132about 4 years ago
Just wondering, why is CPython a lot slower than JS? It seems to me that both languages are interpreted and comes with some reflection functionalities (like modifying object methods), but JS seems a lot faster in most of the benchmarks in <a href="https:&#x2F;&#x2F;benchmarksgame-team.pages.debian.net&#x2F;benchmarksgame&#x2F;fastest&#x2F;python.html" rel="nofollow">https:&#x2F;&#x2F;benchmarksgame-team.pages.debian.net&#x2F;benchmarksgame&#x2F;...</a><p>Edit: Why is this being downvoted? Is my statement incorrect or offensive to some people?
评论 #27143268 未加载
评论 #27142991 未加载
评论 #27142806 未加载
评论 #27142707 未加载
评论 #27147417 未加载
评论 #27143244 未加载
fdejabout 4 years ago
I&#x27;d like to see optimizations targeting ctypes, or a successor to ctypes. I wish I could write elegant, performant C wrappers in pure Python. Right now the best choices are Cython, which is a hassle (separate, slow compilation, various warts), and ctypes, which is slow (and has some design problems of its own). Julia&#x27;s ccall alone is a major selling point over Python right now.
评论 #27141828 未加载
评论 #27141358 未加载
评论 #27147220 未加载
评论 #27145478 未加载
评论 #27142998 未加载
milliamsabout 4 years ago
I posted the link to the first PEP yesterday (<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27134290" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27134290</a>) I think this looks like a very promising project.
评论 #27140760 未加载
The_rationalistabout 4 years ago
The python JIT that promise to get the highest throughput once maturity reached is <a href="https:&#x2F;&#x2F;github.com&#x2F;oracle&#x2F;graalpython" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;oracle&#x2F;graalpython</a>
ForHackernewsabout 4 years ago
Is this going to incorporate the work done as part of <a href="https:&#x2F;&#x2F;blog.pyston.org&#x2F;2020&#x2F;10&#x2F;28&#x2F;pyston-v2-20-faster-python&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.pyston.org&#x2F;2020&#x2F;10&#x2F;28&#x2F;pyston-v2-20-faster-pytho...</a> or <a href="https:&#x2F;&#x2F;github.com&#x2F;facebookincubator&#x2F;cinder" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;facebookincubator&#x2F;cinder</a> ?
bla3about 4 years ago
It&#x27;s good to see that python startup time is an explicit goal. Empty scripts taking 10-100ms is a problem if you use python in Makefiles, where you can have thousands of invocations in a build. This wasn&#x27;t considered a use case upstream cared about for quite some time. I&#x27;m glad to see this is changing. Here&#x27;s hoping the acknowledgement will result in concrete gains!
评论 #27144115 未加载
morelispabout 4 years ago
Stage 2 should&#x27;ve been the selling point of Python 3.<p>If there&#x27;s really a 50% general speed boost sitting around in &quot;normal&quot; bytecode optimization work (and having read a decent amount of CPython I believe there could be), that&#x27;s a criminal amount of energy over the past decade instead wasted dealing with what the type of a codepoint sequence should be named.
评论 #27153168 未加载
etskinnerabout 4 years ago
Why isn&#x27;t this hosted at <a href="https:&#x2F;&#x2F;github.com&#x2F;python&#x2F;cpython&#x2F;issues" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;python&#x2F;cpython&#x2F;issues</a> ?
评论 #27143906 未加载
guggleabout 4 years ago
It really reminds me of this hilarious 2008 keynote by Cal Henderson: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;i6Fr65PFqfk?t=2255" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;i6Fr65PFqfk?t=2255</a><p>(relevant graphic: <a href="https:&#x2F;&#x2F;ibb.co&#x2F;yV6bN9H" rel="nofollow">https:&#x2F;&#x2F;ibb.co&#x2F;yV6bN9H</a> )
cpetersoabout 4 years ago
Guido&#x27;s slides in the repo mention speedup targets, but there is no mention of benchmarks. What is measured gets optimized, but which benchmarks are important for Python users? I&#x27;m sure Django users and Numpy users have very different performance bottlenecks.
评论 #27181856 未加载
frankreyesabout 4 years ago
This project is dead already. Lua is 4x faster out of the box compared to Python (without LuaJIT!). Lua got fast by having ints and floats at the local side of values, not as a reference. That&#x27;s in, the int and float value is in the variable itself, not as a reference with a pointer indirection. In Python, every time you do a=a+1 new memory allocation is made for the a+1 object. Java has the same performance issue with boxed types (new Integer), and this is why C# is faster in many benchmarks. (C# cheated with the hindsight advantage of knowing which were Java mistakes)
sergiomatteiabout 4 years ago
This is the most exciting development I&#x27;ve seen in the Python scene in years!<p>Thanks, Guido and team!
punnerudabout 4 years ago
Deleted. Posted the wrong place. Thanks for the comments.
评论 #27140786 未加载
obviousbobabout 4 years ago
CPython&#x27;s arcane constraints are holding it back - GIL, C API with a global interpreter instance, ref-counting, to name a few.<p>PyPy is already a drop-in replacement for CPython with JIT and using a fraction of the memory.<p><a href="https:&#x2F;&#x2F;dev.nextthought.com&#x2F;blog&#x2F;2018&#x2F;08&#x2F;cpython-vs-pypy-memory-usage.html" rel="nofollow">https:&#x2F;&#x2F;dev.nextthought.com&#x2F;blog&#x2F;2018&#x2F;08&#x2F;cpython-vs-pypy-mem...</a>
评论 #27145681 未加载