Lexer and parser generators using CTFE

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Feb 29 11:11:06 PST 2012

On Thu, Mar 01, 2012 at 12:19:30AM +0530, d coder wrote:
> >
> >
> > This sounds like something I ran into in my D lexer project. Lexing
> > Phobos took upwards of 10-15 seconds, which is extremely slow
> > considering that dmd can *compile* it in just a few seconds. So I did
> > some profiling, and found out that most of the time was spent formatting
> > tokens into strings and running writeln. After I commented that out, the
> > running time dropped to just a few seconds. :-)
> >
> >
> And how different was just a few seconds from 10-15 seconds? :-)

OK so I was imprecise. It was 2-3 seconds compared to 10-15 seconds. So
it's about an order of magnitude difference. :)


"I speak better English than this villain Bush" -- Mohammed Saeed al-Sahaf, Iraqi Minister of Information

More information about the Digitalmars-d mailing list