Compiler optimizations

dennis luehring dl.soluz at gmx.net
Sun Apr 30 06:18:58 PDT 2006


> Please anyone, correct me if I'm wrong, but I think IDIV is a
> pseudo-instruction.  80x86 is notorious for those (as opposed to RISC).  I
> read on the Intel website that intel processors do not have a hardware
> integer division instruction.  Apparently it is somehow better to use the
> floating point instruction instead.

i don't know the truth - but why should all the compiler vendors around 
us (microsoft, intel, ...) produce the slower code if there is an faster 
solution? what is the reason (maybe it produce lager code - it this will 
produce more cache problems...)

> The benchmarks that I've done are constistent with this.  I found it was
> faster to perform a floating-point multiplication on an integer and then
> convert it back to an integer than just a single integer division.

can you post your benchmark source?

> Have you run benchmarks?

no - but i can run your benchmark...



More information about the Digitalmars-d mailing list