Lexer in D
Namespace
rswhite4 at googlemail.com
Sat Mar 2 15:12:58 PST 2013
I noted it to late: decode comes from readText: readText
validates your text. I will now use std.file.read.
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. :)
More information about the Digitalmars-d-learn
mailing list