dmd codegen improvements

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Sat Aug 29 16:10:28 PDT 2015


On Saturday, 29 August 2015 at 13:06:58 UTC, David Nadlinger 
wrote:
> On Saturday, 29 August 2015 at 12:59:59 UTC, Adam D. Ruppe 
> wrote:
>> I'm happy with the codegen the way it is, it is good enough 
>> for me, but let's not make mountains out of hills.
>
> But the fact is that many people are not. Even the core 
> language team, who doesn't want their compiler to get 30% 
> slower on the next release.

LOL. I've actually run into a fun problem with the program that I 
use to update dmd on my box. It needs root permissions to install 
dmd, so it does sudo up front to get the password and then reruns 
it before every command to reset the sudo timer. Before dmd 
switched to the D front-end, that worked, and I didn't have to 
type in my password again. So, I could just kick off the update 
program and leave. However, after the switch to D, the Phobos 
build and tests take longer than 5 minutes (or whatever the exact 
sudo timeout is), and I keep having to rerun my program to update 
dmd, because I run it and forget about it, and sudo eventually 
times out waiting for me to type in the password and terminates 
the update program. If my computer were faster, this wouldn't be 
a problem, but it worked prior to the move to D, and it doesn't 
now. So, from that standpoint, the 30% loss of speed in dmd is 
already costing me.

However, the biggest problem with dmd's slow codegen is probably 
ultimately PR. It's the reference compiler, so it's what folks 
are going to grab first and what folks are most likely to compare 
with their C++ code. That's comparing apples to oranges, but 
they'll do it. And a slow dmd will cost us on some level in that 
regard. The folks who know what they're doing and care about 
performance enough will use ldc or gdc, but it's not what the 
newcomers are likely to grab.

- Jonathan M Davis


More information about the Digitalmars-d mailing list