Is D the Answer to the One vs. Two Language High ,Performance Computing Dilemma?

Dicebot public at dicebot.lv
Sun Aug 18 11:33:04 PDT 2013


On Sunday, 18 August 2013 at 18:26:13 UTC, John Colvin wrote:
> On Sunday, 18 August 2013 at 18:08:58 UTC, Dicebot wrote:
>>> Yes, in limited circumstances if you write D like you would 
>>> write C, you can get comparative performance.
>>
>> I'd say in all cases when you mimic C behavior in D one should 
>> expect same or better performance with ldc/gdc unless you hit 
>> a bug.
>
> array literal allocations. I guess that's debatably a 
> performance bug.

I have said "C behavior", not "C syntax". That is the main 
problem with comparing _language_ performance - stick to same 
semantics and you are likely to get same performance but it may 
require quite inconvenient coding style (i.e. working around 
array literals is a huge pain). So probably it makes more sense 
to compare idiomatic code. But where are the limits?

It is a bit easier with vm-based languages because performance of 
vm implementation itself does matter and can be compared. 
Compiled languages with same backend? No idea how to benchmark 
those properly.

When people expect to get a performance gain from simply using 
certain language, it just can't end good.


More information about the Digitalmars-d mailing list