dmd codegen improvements

Jonathan M Davis via Digitalmars-d digitalmars-d at
Wed Aug 19 19:01:49 PDT 2015

On Tuesday, 18 August 2015 at 22:55:06 UTC, Walter Bright wrote:
> On 8/18/2015 3:17 PM, welkam wrote:
>> People are lazy and if it takes more than one click people 
>> wont use it. Just
>> like unitesting everyone agrees that its good to write them 
>> but nobody does
>> that. When you put unitesting in compiler more people are 
>> writing tests. PGO is
>> awesome, but it needs to be made much simpler before people 
>> use it everyday.
> Exactly. That's why people just want to type "-O" and it 
> optimizes.

At least without separate compilation, it probably wouldn't be 
that hard to add a compiler flag that made it so that the unit 
tests were run after the code was built and then made the 
compiler rebuild the program with the profiling results, but that 
would base the optimizations off of the unit tests rather than 
the actual program, which probably wouldn't be a good idea in 

Another possibility would be to build something into dub. If it 
handled it for you automatically, then that would make it 
comparable to just slapping on the -O flag.

- Jonathan M Davis

More information about the Digitalmars-d mailing list