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/20100408/3bd54bc1/attachment.html below:

2010/4/7 Steven D&#39;Aprano <span dir="ltr">&lt;<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tue, 6 Apr 2010 04:25:08 pm Cesare Di Mauro wrote:<br>
<br>
&gt; It will certainly. There&#39;s MUCH that can be optimized to let CPython<br>
&gt; squeeze more performance from static analysis (even a gross one) on<br>
&gt; locals.<br>
</div>[...]<br>
<div class="im">&gt; They are just &quot;dummy&quot; examples, but can make it clear how far<br>
&gt; optimizations can go with static analysis on locals. Python is a<br>
&gt; language that make it possible to use such analysis at compile time,<br>
&gt; and I think it is a very good thing.<br>
<br>
</div>I&#39;m not opposed to the idea of optimisations in general (far from it!)<br>
but in case anyone is thinking about doing any work in this area,<br>
please be careful about floating point optimisations. E.g. given a float<br>
x, you can&#39;t assume that x*0 == 0. Nor can you assume that 0-x is the<br>
same as -x. (The second is *almost* always correct, except for one<br>
float value.)<br>
<br>
See, for example, the various writings by Professor Kahan:<br>
<br>
<a href="http://www.drdobbs.com/184410314" target="_blank">http://www.drdobbs.com/184410314</a><br>
<a href="http://www.cs.berkeley.edu/~wkahan/" target="_blank">http://www.cs.berkeley.edu/~wkahan/</a><br>
<br>
Most of the issues discussed apply to languages that deal with floats at<br>
a lower level than Python does, but still, simple minded optimizations<br>
will break corner cases no matter what language you use.<br>
<br>
--<br>
<font color="#888888">Steven D&#39;Aprano</font></blockquote><div><br></div><div>Thanks for the useful links.</div><div><br></div><div>I never applied such kind of optimizations, and I think I&#39;ll never to do it anyway. :)</div>
<div><br></div><div>Cesare</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