On quarta-feira, 16 de maio de 2012 11.20.03, Bill Spitzak wrote: > Thiago Macieira wrote: > > However, the div and mul are much more interesting. Those ought to be the > > same, so I am actually wondering how it is possible that the div and mul > > on > > x86-64 can be so slow. > > Divide by x and multiply by 1/x are not exactly the same because 1/x may > not be exactly represented in the floating point format. So I think this > is the reason the compiler is not producing the optimization. Though > 1/256 can be represented exactly so it does not apply to this specific case.
Please note that it's the same code, same compiler, the difference is whether
it's using x87 or SSE for the floating point math. Somehow, the x87 code is
faster, which is counter-intuitive.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
