TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

PyPy 1.4: Ouroboros in practice

127 点作者 aaw超过 14 年前

6 条评论

timtadh超过 14 年前
Currently testing a CPU intensive algorithm I need for my current research project. Hoping it will save me some time. When I am done I will post the results!<p>[Edit:]<p>Pretty good so far!<p><pre><code> ~/stuff/Programming/faultire/src/ hendersont@glycineportable src $ time pypy sleepytree/test_metricspace.py ....... ---------------------------------------------------------------------- Ran 7 tests in 39.621s OK real 0m39.675s user 0m39.150s sys 0m0.170s ~/stuff/Programming/faultire/src/ hendersont@glycineportable src $ time python sleepytree/test_metricspace.py ....... ---------------------------------------------------------------------- Ran 7 tests in 69.442s OK real 1m9.483s user 1m8.970s sys 0m0.110s</code></pre>
评论 #1944123 未加载
评论 #1944714 未加载
orangecat超过 14 年前
Interesting and promising. PyPy 1.4:<p><pre><code> &#62;&#62;&#62;&#62; t1 = time.time(); a=[x*x for x in xrange(1000000)]; time.time()-t1 0.38609600067138672 &#62;&#62;&#62;&#62; t1 = time.time(); a=[x*x+math.sin(x/1000000.) for x in xrange(1000000)]; time.time()-t1 0.42182803153991699 </code></pre> Python 2.7:<p><pre><code> &#62;&#62;&#62; t1 = time.time(); a=[x*x for x in xrange(1000000)]; time.time()-t1 0.25005197525024414 &#62;&#62;&#62; t1 = time.time(); a=[x*x+math.sin(x/1000000.) for x in xrange(1000000)]; time.time()-t1 0.6075689792633057 </code></pre> Both running in 64-bit on a 2.53GHz Core 2 Duo. It looks like PyPy's JIT has some fixed overhead, but can heavily optimize operations once it gets going.
评论 #1945103 未加载
dochtman超过 14 年前
I think this is the first PyPy release that's actually viable to use for me (because of x86-64). Very exciting!<p>(Hope they catch up with 2.6 - or 2.7 - soon, though.)
评论 #1943158 未加载
RyanMcGreal超过 14 年前
&#62;PyPy is a very compliant Python interpreter, almost a drop-in replacement for CPython.<p>What still works in CPython but not PyPy?
评论 #1944314 未加载
评论 #1943899 未加载
评论 #1945074 未加载
评论 #1943761 未加载
Tycho超过 14 年前
Sorry to bother people with this question, but I've spent ages searching my internet history for an answer, to no avail:<p>A few weeks ago someone posted a Python related link on HN. It was some sort of guide or in-depth analysis, with code snippets. The code snippets did not have any syntax colouring. The background of the site was a nice dark/deep green texture (slightly bluish maybe). The top of the page had a sort of golden bookmark icon in the corner.<p>If anyone remembers that site <i>please</i> let me know the url or the title. I need to find it again.
carlosedp超过 14 年前
I hope they add support for JIT with the Stackless features.