Optimizer of D

Dave Dave_member at pathlink.com
Thu Mar 8 07:52:56 PST 2007


Also, from your code in the OP, the result of process() is never used, so the GCC optimizer might be 
optimizing some of that away also.

Regardless, floating point optimizations are currently not a strong point of the DMC/DMD optimizer. 
If those were on par with GCC, then DMD would probably take top honors here in the Language Shootout:

http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all

There are other frequent visitors to this NG (i.e.: Don Clugston) with a lot of experience with 
writing non-trivial FP code and libraries with D...

Hope you don't mind me mentioning your name Don - If you see this, could you chime in here with some 
common code-level optimizations, etc., that you've found useful?

Good luck with your D testing!

g wrote:
> Alright just found something: it's a constant optimization, if I replace process(14) by process(loop), I do get more similar timings:
> 
> DMD
>  -> time: 159690µs, y=-1.72651e+11
> GDMD
>  -> time: 115564µs, y=-1.72651e+11
> G++
>  -> time: 107154µs, y=-1.72651e+11
> 
> I will do serious testing now, with a full library. However if this constant optimization could be integrated, would be nice ;)



More information about the Digitalmars-d mailing list