Table lookups - this is pretty definitive
Daniel N
ufo at orbiting.us
Wed Apr 2 01:27:01 PDT 2014
On Wednesday, 2 April 2014 at 03:47:58 UTC, Marco Leise wrote:
> Do I see it right that it really comes down to one use of
> isIdentifierStart(c) in one huge switch-case? Since "warp"
> seems to be interested only in ASCII properties since it is
> processing C code, could the switch-case be optimized into a
> 256 entries large jump table?
>
> If a table lookup (char->bool) is faster than multiple
> comparisons, why shouldn't this apply to char->address as well?
I was thinking the same, sure would be nice if computed goto:s
were standardized. (as suggested by Bearophile many times)
More information about the Digitalmars-d
mailing list