I don't think I've ever encountered a common practical programming situation where I wanted null-termination as the convention for strings.
Are you sure it's actually more efficient, though? Because the count remaining narrows the token possibilities quickly.
-
-
So I think it would depend on _what_ you were lexing. If you're ever lexing keywords, I think count might be faster?
-
But yeah, I think if you're just "some short symbols and then 'identifier'", probably null terminator is faster...
End of conversation
New conversation -
-
-
If you're lexing a whole file, "count remaining" is always going to be larger than any keyword until near the end.
-
how big if a speedup are we talking about here. I am skeptical itnis significant!
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.