Compiler optimizations

dennis luehring dl.soluz at gmx.net
Sun Apr 30 05:53:54 PDT 2006


> Another thing.  I know that integer division is essentially a floating point
> operation because there is no integer division instruction.

and what is "idiv" for you?
(http://www.jegerlehner.ch/intel/opcode.html)

> I also read
> some on the internet and learned that Intel has a library that provides
> fixed-point math routines, which provides a division operation that
> outperforms floating-point division.  Then I thought to myself, "Why don't
> compilers just use fixed-point division for dividing integers since it's
> faster?"

a fixpoint floating somethimes outperforms an floating-point operating 
(with loss of precession)

but it never outperforms an true integer division

ciao dennis



More information about the Digitalmars-d mailing list