Is D the Answer to the One vs. Two Language High ,Performance Computing Dilemma?
Russel Winder
russel at winder.org.uk
Sun Aug 18 01:26:45 PDT 2013
On Sun, 2013-08-18 at 01:59 -0400, John Joyus wrote:
> On 08/11/2013 04:22 AM, Walter Bright wrote:
> > http://elrond.informatik.tu-freiberg.de/papers/WorldComp2012/PDP3426.pdf
>
> This article claims the "Performance [of D] is equivalent to C".
>
> Is that true? I mean even if D reaches 90% of C's performance, I still
> consider it great because of its productive features, but are there any
> benchmarks done?
Not a statistically significant benchmark but an interesting data point:
C:
==================== Sequential
pi = 3.141592653589970752
iteration count = 1000000000
elapse time = 8.623442
C++:
==================== Sequential
pi = 3.14159265358997075
iteration count = 1000000000
elapse = 8.61212399999999967
D:
======================== pi_sequential.d
π = 3.141592653589970752
iteration count = 1000000000
elapse time = 8.612256
C and C++ were compiled with GCC 4.8.1 full optimization, D was compiled
with LDC full optimization. Oh go on, let's do it with GDC as well:
======================== pi_sequential.d
π = 3.141592653589970752
iteration count = 1000000000
elapse time = 8.616558
And you are going to ask about DMD aren't you :-)
======================== pi_sequential.d
π = 3.141592653589970752
iteration count = 1000000000
elapse time = 9.495549
Remember this is 1 and only 1 data point and not even a sample just a
single data point. Thus only hypothesis building is allowed, no
deductions. But I begin to believe that D is as fast as C and C++ using
GDC and LDC. DMD is not in the execution performance game.
Further fudging, the code is just one for loop. The parallel results
are just as encouraging for D. I will say though that std.concurrency
and std.parallelism could do with some more work. On the other hand C
has nothing like it, whilst C++ has a few options including TBB.
As I say, indicators, not statistically significant results without big
data samples and serious ANOVA.
--
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130818/0565273c/attachment-0001.pgp>
More information about the Digitalmars-d
mailing list