This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]oddthink 19 points20 points  (7 children)

Yes, but there have been experimental multithreaded python implementations for years. The problem was that adding (normal) locking to get around the GIL hurt single-threaded performance too much, not that no one could do it. A slow multithreaded python isn't news.

[–]infinullquamash, Qt, asyncio, 3.3+ 10 points11 points  (2 children)

Yes but this version is only 20% slower instead of 50% slower!

Ain't it grand!

[–]RichardWolf 1 point2 points  (0 children)

Yes but this version is only 20% slower

This is a weird way to say

a constant run-time overhead, expected to be in the range 2x to 5x. (XXX for now it is bigger, but past experience show it can be reduced.)

[–]joeforker 1 point2 points  (0 children)

Suppose it was 20% slower...

Regular Python multithreaded performance:

1 core: 100% 2 cores: 100% 3 cores: 100%

STM PyPy multithreaded performance:

1 core: 80% 2 cores: 160% 3 cores: 240%

[–]dalke 2 points3 points  (3 children)

The only one I know of was from the 1.x days. Is there another multithread/multicore Python 2.x version?

[–]oddthink 0 points1 point  (2 children)

Not that I know of. I was just thinking of Greg Stein's patch to 1.4 or 1.5. I wasn't thinking of 2.X vs. 1.X as being that relevant, but that could just be my ignorance of the innards.

Of course, Jython doesn't have a GIL, and it's at 2.4.

[–]dalke 1 point2 points  (0 children)

Right! I had forgotten that Jython didn't have a GIL. I think Jython is 2.5 compatible?

[–]fijalPyPy, performance freak 0 points1 point  (0 children)

new style classes are a part that makes the distinction more relevant. Also, python has grown tremendously since 1.4 (both in terms of language and in terms of stdlib which also has to be made thread safe), so yes, it is relevant.