Official compiler

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 25 16:56:22 PST 2016


On 2/25/2016 3:06 PM, H. S. Teoh via Digitalmars-d wrote:
> I remember you did a bunch of stuff to the optimizer after the
> switchover to self-hosting; how much of a difference did that make? Are
> there any low-hanging fruit left that could make dmd faster?

There's a lot of low hanging fruit in dmd. In particular, far too many templates 
are instantiated over and over.

The data structures need to be looked at, and the excessive memory consumption 
also slows things down.

> On a related note, I discovered an O(n^2) algorithm in the front-end...
> it's unlikely to be an actual bottleneck in practice (basically it's
> quadratic in the number of fields in an aggregate), though you never
> know. It actually does a full n^2 iterations, and seemed like it could
> be at least pared down to n(n+1)/2, even without doing better than
> O(n^2).

Please add a comment to the source code about this and put it in a PR.



More information about the Digitalmars-d mailing list