<div dir="ltr"><br><br><div class="gmail_quote">On Mon, Aug 22, 2011 at 10:17 AM, Nadav Har'El <span dir="ltr"><<a href="mailto:nyh@math.technion.ac.il">nyh@math.technion.ac.il</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Sun, Aug 21, <a href="tel:2011" value="+9722011">2011</a>, Orna Agmon Ben-Yehuda wrote about "Re: [Haifux] Running 32 bit applications (Firefox?) on 64 bit machines":<br>
<div class="im">> I forgot to mention that sometimes, on really funny occasions, you get a<br>
> performance penalty from using the 64bit code. For example, when you take a<br>
> number close to 1 (1.00000001) to a power. You will get absolutely stuck<br>
> with the 64bit code.<br>
<br>
</div>This is really bizarre...<br>
<br>
I wonder how x86 and x86-64 differ in that regard?<br>
<div class="im"><br></div></blockquote><div><br></div><div>I found an explanation by Paul Murphy, saying the x86 implementation is very optimized in assembly.</div><div> <a href="http://sourceware.org/ml/libc-help/2009-01/msg00005.html">http://sourceware.org/ml/libc-help/2009-01/msg00005.html</a></div>
<div><br></div><div>An ad-hoc solution we found was (when the accurate result was not required, just an approximation) :</div><div>to cast the double to a float, perform the power operation, then cast back to double. It solved the slowness, but I don't know what to do when I actually need the accurate result.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
--<br>
Nadav Har'El | Monday, Aug 22 <a href="tel:2011" value="+9722011">2011</a>, 22 Av <a href="tel:5771" value="+9725771">5771</a><br>
<a href="mailto:nyh@math.technion.ac.il">nyh@math.technion.ac.il</a> |-----------------------------------------<br>
</div>Phone <a href="tel:%2B972-523-790466" value="+972523790466">+972-523-790466</a>, ICQ 13349191 |Unix is simple, but it takes a genius to<br>
<a href="http://nadav.harel.org.il" target="_blank">http://nadav.harel.org.il</a> |understand its simplicity.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Orna Agmon Ben-Yehuda.<br><a href="http://ladypine.org">http://ladypine.org</a><br>
</div>