Lexer in D
Dmitry Olshansky
dmitry.olsh at gmail.com
Mon Mar 4 11:08:46 PST 2013
04-Mar-2013 22:58, Namespace пишет:
> Yes, I know. But I do not think I have a chance to get even closer to
> it. At least I don't know, how.
One thing that all of these lexers do (dmd's orignal and Dscanner) is
get tokens as you need them - lazily. You would always be slower if
taking time to append them in some array (no matter how). The idiomatic
way as I said is to use ranges.
> I'm on a AMD Athlon 64 X2 Dual Core Processor 5400+.
Mm that's not that far away from mine. But Brain has got something even
more powerful :)
You can easily download and test Dscanner on the your CPU so that you
get numbers that are actually comparable.
--
Dmitry Olshansky
More information about the Digitalmars-d-learn
mailing list