A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20121027/17035ea3/attachment.html below:

One word: profile.<div><br></div><div>Looking at stat counts alone rather than measuring the total time spent in all types of system calls from strace and profiling is not really useful. ;)<div><br></div><div>Another thing to keep an eye out for within a startup profile:  how often does the gc collect?  our default gc collection thresholds haven't been tuned in ages afaik [or am i forgetting something] and I know of pathological cases at work where simply doing a gc.disable() before importing a bunch of modules (tons of generated protocol buffer code) and re-enabling it afterwards speeds up this application's startup way more significantly than seems healthy in 2.x... that could be related to the particulars of the protobuf module code though.</div>

<div><br></div><div>-gps<br><br><div class="gmail_quote">On Sat, Oct 27, 2012 at 4:00 PM, Antoine Pitrou <span dir="ltr"><<a href="mailto:solipsis@pitrou.net" target="_blank">solipsis@pitrou.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Sun, 28 Oct 2012 01:39:42 +0300<br>


Serhiy Storchaka <<a href="mailto:storchaka@gmail.com">storchaka@gmail.com</a>> wrote:<br>
<br>
> On 28.10.12 01:06, Brett Cannon wrote:<br>
> > I really doubt that as the amount of stat calls is significantly reduced<br>
> > in Python 3.3 compared to Python 3.2 (startup benchmarks show Python 3.3<br>
> > is roughly 1.66x faster than 3.2 thanks to caching filenames in a<br>
> > directory).<br>
><br>
> $ strace ./python -c '' 2>&1 | grep -c stat<br>
><br>
> Python 2.7 - 161 stats<br>
> Python 3.2 - 555 stats<br>
> Python 3.3 - 243 stats<br>
<br>
</div>This will probably depend on the length of sys.path:<br>
<br>
$ strace -e stat python2.7 -Sc "" 2>&1 | wc -l<br>
35<br>
$ strace -e stat python3.2 -Sc "" 2>&1 | wc -l<br>
298<br>
$ strace -e stat python3.3 -Sc "" 2>&1 | wc -l<br>
106<br>
<br>
$ strace -e stat python2.7 -c "" 2>&1 | wc -l<br>
200<br>
$ strace -e stat python3.2 -c "" 2>&1 | wc -l<br>
726<br>
$ strace -e stat python3.3 -c "" 2>&1 | wc -l<br>
180<br>
<br>
Regards<br>
<span class="HOEnZb"><font color="#888888"><br>
Antoine.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-dev" target="_blank">http://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/greg%40krypto.org" target="_blank">http://mail.python.org/mailman/options/python-dev/greg%40krypto.org</a><br>
</div></div></blockquote></div><br></div></div>

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