Inherent code performance advantages of D over C?

Brad Roberts braddr at puremagic.com
Fri Dec 13 18:16:08 PST 2013


On 12/13/13 11:07 AM, David Nadlinger wrote:
> On Thursday, 12 December 2013 at 20:46:26 UTC, Walter Bright wrote:
>> On 12/12/2013 12:33 PM, Max Samukha wrote:
>>> Don't you find it somewhat alarming that both alternative compilers follow
>>> neither the standard inline asm nor ABI?
>>
>> I find it unfortunate. But it also can be difficult and time consuming to reimplement an assembler
>> for those back ends, so I can understand why it isn't a priority.
>
> LDC in fact implements DMD-style inline assembly (occasionally there are bugs, though, as it's a
> complete reimplementation).
>
> I don't think it would be unreasonable to work towards a common D ABI on the various Posix x86_64
> systems, but given that DMD comes with its own bespoke exception handling implementation which
> doesn't really make sense to implement in GDC/LDC (as libunwind is the platform standard on Linux/…
> anyway), there is not really much motivation to start work on aligning the other parts of the ABI
> either.
>
> David

I think it's very important to work towards a common D ABI.  Even further, I believe it's important 
for druntime and phobos to be binary compatible between the compilers.  That dmd uses a different eh 
scheme is more a factor of Walter not understanding the standard linux c++ eh mechanism well enough 
to implement it and instead took the path of least resistance and wrote his own.  This is very 
correctable, just needs someone to do it.


More information about the Digitalmars-d mailing list