[PATCH] use magic wl_fixed_t to/from double only on x86-64
Bill Spitzak
spitzak at gmail.com
Wed May 16 11:20:03 PDT 2012
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.
More information about the wayland-devel
mailing list