Lexer in D
Dmitry Olshansky
dmitry.olsh at gmail.com
Sat Mar 2 22:49:34 PST 2013
03-Mar-2013 03:12, Namespace пишет:
> I noted it to late: decode comes from readText: readText validates your
> text. I will now use std.file.read.
>
That's why Walter promotes profilers. They help verify hypothesis on
performance and constantly surprise people in what they actually find.
> The new trace output is here and it seems you're right, isKeyword and
> isType (yes I'd decided to separate it again and keep both in the lexer)
> take a lot of time:
> http://dpaste.1azy.net/0d6aff6b
> 154874 106186 95403 0 pure nothrow bool
> Puzzle.Lexer.isKeyword(immutable(char)[])
> 159688 78020 69289 0 pure nothrow bool
> Puzzle.Lexer.isType(immutable(char)[])
>
> I never thought that. :)
--
Dmitry Olshansky
More information about the Digitalmars-d-learn
mailing list