Woeful performance of D compared to C++

Dave Dave_member at pathlink.com
Fri Jan 19 07:41:19 PST 2007


Paulo Herrera wrote:
> Hi,
> I've be investigating about performance of different programming
> languages/compiler using some micro-benchmarks like the one posted in this
> thread. I observed that in many of them library implementations are much
> more important than the language itself. Some of my results are posted here
> http://pauloherrera.blogspot.com/ .
> 
> In the case of random number generators the performance difference among
> different implementations/algorithms in the same language can be orders of
> magnitude.
> I don't know why all libraries do not implement the Mersenne-Twister
> algorithm that is considered as the fastest and highest quality (most
> random).
> 
> Paulo
> 

Nice blog. Hopefully in the near future or so DMD will get improved floating point code generation. 
If so, that should put it at/near the top for each test you sited.

D itself has an advantage that may turn out to be very important for numerical codes; the real data 
type supports the hardware maximum, so for example D supports 80 bit precision on x86 where other 
languages/compilers don't. Plus there isn't a limit in the D spec. on maximum precision so D 
compilers can optimize more aggressively.

Performance aside, what was your impression on writing the code for each language?

Thanks,

- Dave



More information about the Digitalmars-d mailing list