Interesting, …

Russel Winder via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Fri Jun 6 09:04:34 PDT 2014


For fun (!) I used my new ldc2 build on Fedora 20 to run my "π by
quadrature" examples. On my 7 year old 8 core workstation, the various C
++ versions tend to take about 1.1s using all 8 cores (as do C, Java,
Scala, etc.). Indeed generally so do all the D codes using LDC or GDC –
DMD takes generally twice as long.

Now something potentially remarkable: using ldc the std.parallelism.map
version of the code takes 0.6s. dmd takes 2.6s, I can't test gdc on
Fedora as Fedora do not package it and I haven't built it.

There could be many reasons for this result, but it appears at present a
genuine "D runs 1.8 times faster than C++".

Clearly this needs std.benchmark to be rolled out, along with something
equivalent for C++ (but I am not sure what just at present). More news
as it happens.
 
-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder



More information about the digitalmars-d-ldc mailing list