Table lookups - this is pretty definitive

Daniel N ufo at orbiting.us
Wed Apr 2 09:52:53 PDT 2014


> On Tuesday, 1 April 2014 at 18:35:50 UTC, Walter Bright wrote:
>> Try this benchmark comparing various classification schemes:
>>
>> bool isIdentifierChar1(ubyte c)
>> {
>>    return ((c >= '0' || c == '$') &&
>>            (c <= '9' || c >= 'A')  &&
>>            (c <= 'Z' || c >= 'a' || c == '_') &&
>>            (c <= 'z'));
>> }

Considering SSE4.2 was released already back in 2008 and was 
designed to accelerate this very use-case...

Maybe it's more beneficial to add a few new code-paths... SSE4.2, 
NEON, etc.


More information about the Digitalmars-d mailing list