Re: [PATCH] use magic wl_fixed_t to/from double only on x86-64

2012-05-16 Thread Thiago Macieira
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

Re: [PATCH] use magic wl_fixed_t to/from double only on x86-64

2012-05-16 Thread Bill Spitzak
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 represen

Re: [PATCH] use magic wl_fixed_t to/from double only on x86-64

2012-05-16 Thread Pavel Vasin
> on x86: > benchmarked magic: 14.048889885s > benchmarked div:5.426952392s > benchmarked mul:4.034106976s > > on x86-64: > benchmarked magic: 2.467789582s > benchmarked div:9.748067755s > benchmarked mul:8.665307997s > Did you compile your 32-bit code wit

Re: [PATCH] use magic wl_fixed_t to/from double only on x86-64

2012-05-16 Thread Thiago Macieira
On quarta-feira, 16 de maio de 2012 13.34.42, Pavel Vasin wrote: > on x86: > benchmarked magic: 14.048889885s > benchmarked div:5.426952392s > benchmarked mul:4.034106976s > > on x86-64: > benchmarked magic: 2.467789582s > benchmarked div:9.748067755s > benchmarked

[PATCH] use magic wl_fixed_t to/from double only on x86-64

2012-05-16 Thread Pavel Vasin
My results on Intel(R) Core(TM)2 Duo CPU T5800 @ 2.00GHz on x86: benchmarked magic: 14.048889885s benchmarked div:5.426952392s benchmarked mul:4.034106976s on x86-64: benchmarked magic: 2.467789582s benchmarked div:9.748067755s benchmarked mul:8.6653