Showing content from http://mail.python.org/pipermail/python-dev/attachments/20091108/2c3ea338/attachment.htm below:
<div class="gmail_quote">2009/11/7 Antoine Pitrou <span dir="ltr"><<a href="mailto:solipsis@pitrou.net" target="_blank">solipsis@pitrou.net</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hello again,<br>
<div><br>
> It shows that, on my platform for this specific benchmark:<br>
> * newgil manage to leverage a significant amount of parallelism<br>
> (1.7) where python 3.1 does not (3.1 is 80% slower)<br>
<br>
</div>I think you are mistaken:<br>
<br>
-j0 (main thread only)<br>
<div>newgil: 47.483s, 47.605s, 47.512s<br>
-j4 (4 consumer threads, main thread producing/waiting)<br>
</div><div>newgil: 48.428s, 49.217s<br>
<br>
</div>The runtimes are actually the same, so newgil doesn't leverage anything.<br>
However, it doesn't degrade performance like 2.x/3.1 does :-)<br></blockquote><div><br>Ooops, I was comparing to 3.1 -j4 times which make no sense. One would think I wanted to see that result since I though the GIL was released :/. This greatly reduce the interest of this benchmark...<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> * 3.1 is more than 2 times slower than python 2.6 on this<br>
> benchmark<br>
<br>
That's the most worrying outcome I'd say. Are you sure the benchmark<br>
really does the same thing? Under 2.6, you should add re.UNICODE to the<br>
regular expression flags so as to match the 3.x semantics.<br></blockquote><div><br>I've tried, but there is no change in result (the regexp does not use \w & co but specify a lot unicode ranges). All strings are already of unicode type in 2.6.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
> [if I understood correctly in 3.x regex release the GIL].<br>
<br>
</div>Unless I've missed something it doesn't, no.<br></blockquote><div>Hmmm, I was confusing with other modules (bzip2 & hashlib?). Looking back at the result of your benchmark it's obvious. Is there a place where the list of functions releasing the GIL is available? I did not see anything in bz2.compress documentation.<br>
</div></div><br>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4