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/20090324/d24871af/attachment.htm below:

<div class="gmail_quote">On Tue, Mar 24, 2009 at 10:13 AM, Mark Dickinson <span dir="ltr">&lt;<a href="mailto:dickinsm@gmail.com">dickinsm@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2009/3/24 Daniel Stutzbach &lt;<a href="mailto:daniel@stutzbachenterprises.com">daniel@stutzbachenterprises.com</a>&gt;:<br>
&gt; [...]<br>
<div class="im">&gt; 100 nanoseconds, py3k trunk:<br>
&gt; ceval -&gt; PyObject_GetItem (object.c) -&gt; list_subscript (listobject.c) -&gt;<br>
&gt; PyNumber_AsSsize_t (object.c) -&gt; PyLong_AsSsize_t (longobject.c)<br>
</div>&gt; [more timings snipped]<br>
<br>
Does removing the PyLong_Check call in PyLong_AsSsize_t<br>
make any noticeable difference to these timings?<br>
</blockquote></div><br>Making no other changes from the trunk, removing the PyLong_Check and NULL check from PyLong_AsSsize_t shaves off 4 nanoseconds (or around 4% since the trunk is around 100 nanoseconds).<br><br>Here&#39;s what I&#39;m testing with, by the way:<br>
<br>./python.exe Lib/timeit.py -r 10 -s &#39;x = list(range(10))&#39; &#39;x[5]&#39;<br><blockquote style="margin: 1.5em 0pt;">--<br>
Daniel Stutzbach, Ph.D.<br>
President, <a href="http://stutzbachenterprises.com">Stutzbach Enterprises, LLC</a>
</blockquote>

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