Don wrote:
bearophile wrote:
kai:
Any ideas? Am I somehow not hitting a vital compiler optimization?
DMD compiler doesn't perform many optimizations, especially on
floating point computations.
More precisely:
In terms of optimizations performed, DMD isn't too far behind gcc. But
it performs almost no optimization on floating point. Also, the inliner
doesn't yet support the newer D features (this won't be hard to fix) and
the scheduler is based on Pentium1.
Have to be careful when talking about floating point optimizations. For example,
x/c => x * 1/c
is not done because of roundoff error. Also,
0 * x => 0
is also not done because it is not a correct replacement if x is a NaN.