On Mon, Aug 22, 2011 at 10:17 AM, Nadav Har'El <n...@math.technion.ac.il>wrote:
> On Sun, Aug 21, 2011, Orna Agmon Ben-Yehuda wrote about "Re: [Haifux] > Running 32 bit applications (Firefox?) on 64 bit machines": > > I forgot to mention that sometimes, on really funny occasions, you get a > > performance penalty from using the 64bit code. For example, when you take > a > > number close to 1 (1.00000001) to a power. You will get absolutely stuck > > with the 64bit code. > > This is really bizarre... > > I wonder how x86 and x86-64 differ in that regard? > > I found an explanation by Paul Murphy, saying the x86 implementation is very optimized in assembly. http://sourceware.org/ml/libc-help/2009-01/msg00005.html An ad-hoc solution we found was (when the accurate result was not required, just an approximation) : 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. -- > Nadav Har'El | Monday, Aug 22 2011, 22 Av > 5771 > n...@math.technion.ac.il > |----------------------------------------- > Phone +972-523-790466, ICQ 13349191 |Unix is simple, but it takes a genius > to > http://nadav.harel.org.il |understand its simplicity. > -- Orna Agmon Ben-Yehuda. http://ladypine.org
_______________________________________________ Haifux mailing list Haifux@haifux.org http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux