On Fri, Feb 23, 2018 at 08:51:20PM +0000, Rubn via Digitalmars-d wrote:
> This slowdown for this specific example isn't cause by templates, it's
> caused by having to parse all the extra lines of code from phobos. I
> didn't say there aren't problems with templates, but this example
> accurately depicts nothing.

I say again, do you have measurements to back up your statement?

Parsing is actually very fast with the DMD front end.  I can't believe
that it will take half a second to parse a Phobos module -- the
compiler's parser is not that stupid.  I have a 1600+ line module that
compiles in about 0.4 seconds (that's lexing + parsing + semantic +
codegen), but that time more than doubles when you just change a loop
into a range-based algorithm.  Clearly, parsing is not the bottleneck


Unix is my IDE. -- Justin Whear

Reply via email to