mul + div with 64 bit signed ints on IA32
Thomas R. Truscott
trt@cs.duke.edu
Wed Sep 5 13:40:00 GMT 2001
> There are possibilities to speed up the following operations for IA32
> int64_t * int64_t
> int64_t / int64_t
> int64_t % int64_t (?)
> Interests?
I would be more interested in speedups for:
int64_t / smallconst
int64_t % smallconst
For division, the multiply-by-reciprocal trick
used for "int32_t / smallconst" might work.
For mod, it might be possible to do something like
int64_t (x) % smallconst => x - (x/smallconst)*smallconst
> It this used in any benchmark?
I don't know, but have an additional question:
On systems which support both a 32-bit and 64-bit ABI,
do vendors report benchmarks for both?
Or just the one that gives the best numbers?
Tom Truscott
More information about the Gcc
mailing list