DIP 1031--Deprecate Brace-Style Struct Initializers--Community Review Round 1 Discussion

H. S. Teoh hsteoh at quickfur.ath.cx
Sun Feb 16 06:27:32 UTC 2020


On Sat, Feb 15, 2020 at 09:13:01PM -0800, Walter Bright via Digitalmars-d wrote:
[...]
> I'm amused that a hallmark of poor quality is being adaptable to
> diverse architectures.

Yeah, I think the original criticism here was a bit ridiculous. However:


> No other backend has ever been able to come close to its speed at the
> level of code quality it produces (it was originally designed to run
> on 16 bit floppy systems).

What's the point of lightning fast generation of poor quality code?
Okay, during development it's good to have fast turnaround times. But
what when it's release time and I want to squeeze the last bit of juice
from the generated code?  Running dmd -O for this is, sorry to say, a
disappointment. I've measured this against LDC and GDC, and they
*consistently* produce code that outperforms dmd-generated code. A
20%/30% speedup is typical, sometimes with compute-heavy code it can be
40% faster than dmd generated code.

I've been saying this for years, and even reported bugs about it. But so
far, things have not changed very much. When runtime performance
matters, I don't even consider dmd, I already know ldc/gdc will produce
faster code.

So sure, the dmd backend is the fastest of its kind that produces 20%
slower code, but that's hardly something to boast about now, is it?


> But I'm open to suggestions for improvement of the quality. If you
> have something specific, PRs are welcome.

Well this is part of the problem: because the code style is old and
unfamiliar to most contemporary programmers, you're not going to find
many people who would be able to contribute a PR. And those who can may
not necessarily be willing to spend the time to do so.  Chicken and egg
problem.

People *can* file bugs related to performance, though. I did. And I'm
still waiting for results.


T

-- 
One reason that few people are aware there are programs running the internet is that they never crash in any significant way: the free software underlying the internet is reliable to the point of invisibility. -- Glyn Moody, from the article "Giving it all away"


More information about the Digitalmars-d mailing list