On Fri, 2014-05-30 at 19:58 +0000, bearophile via Digitalmars-d wrote: > Russel Winder: > > > A priori I would believe there a problem with these numbers: my > > experience of CPU-bound D code is that it is generally as fast > > as C++. > > The C++ code I've shown above if compiled with -Ofast seems > faster than the D code compiled with ldc2.
I am assuming you are comparing C++/clang with D/ldc2, it is only reasonable to compare C++/g++ with D/gdc. I am not sure about other compilers. Of course there is then the question of whether C++/clang is better/worse than C++/g++. Lots of fun experimentation and data analysis to be had here, if only there were microbenchmarking frameworks for C++ as well as D ;-) -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.win...@ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: rus...@winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder