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.

PyPy 1.4: Ouroboros in practice

127 pointsby aawover 14 years ago

6 comments

timtadhover 14 years ago
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 未加载
orangecatover 14 years ago
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 未加载
dochtmanover 14 years ago
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 未加载
RyanMcGrealover 14 years ago
&#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 未加载
Tychoover 14 years ago
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.
carlosedpover 14 years ago
I hope they add support for JIT with the Stackless features.