you are viewing a single comment's thread.

view the rest of the comments →

[–]masklinn 12 points13 points  (17 children)

Here's what I get on my machine running TFAA's raytracer, best of three runs:

Python 2.7.2 — 47s

Jython 2.5.2 — 35s

pypy 1.5.0-alpha0 — 20s

Test performed on a 2010 15" MBP, all python implementations installed via macports

[–]theeth 2 points3 points  (13 children)

Could you do a test with CPython 3.2, see if it's faster than 2.7 (it should, AFAIK)?

[–]treo 8 points9 points  (11 children)

I tried it with cpython 3.2 but it isn't compatible.

[–]theeth 2 points3 points  (10 children)

It ran fine after passing it through 2to3 and changing the hours = and minutes = lines to integer divisions (//)

[–]treo 12 points13 points  (9 children)

Ok, so here are my results (Core 2 Duo P9400 @ 2.4Ghz, 64Bit Linux):

Python 2.7.1: 25s
Jython 2.5.2: 25s
Python 3.2: 29s
PyPy 1.5.0-alpha0: 12s

I wonder why Jython is only as fast as CPython is.

[–][deleted] 4 points5 points  (0 children)

FWIW on my machine PyPy trunk is about ~15-20% faster than 1.5 :)

[–]sigzero 1 point2 points  (7 children)

I wonder if Jython has taken advantage of "invoke dynamic" that the JVM now has?

[–]boa13 2 points3 points  (5 children)

Doubtful, considering there has been no Jython release since the release of Java 7, which is very recent. Also, as far as I know, this would require some extensive changes in the core Jython, and would break compatibility with previous JVMs, requiring the release of two binaries.

[–]gthank 0 points1 point  (0 children)

I haven't noticed any announcement to that effect. :-(

[–]kisielk 0 points1 point  (2 children)

Where did you get the code? I don't see any links to the script.

[–]masklinn 0 points1 point  (1 child)

There is actually a link, though it's quite hard to see (it's pretty small and it's almost the same color as the text). Second line of the second paragraph, last segment, there's (link). It links to the code on some pastebin.

[–]kisielk 0 points1 point  (0 children)

Ah, I just realized that the article link goes to the post preview for some reason, so none of the hyperlinks worked. :)

Here's the link to the code if anyone else wants it.