Not measurable by any means, but conceptually this is faster since
the mask matches more often than the digest.
while (c->buffer->idx < c->buffer->len)
{
- if ((c->buffer->cur().mask & c->lookup_mask) &&
- digest->may_have (c->buffer->cur().codepoint) &&
+ if (digest->may_have (c->buffer->cur().codepoint) &&
+ (c->buffer->cur().mask & c->lookup_mask) &&
apply_once (c))
ret = true;
else
while (c->buffer->idx < c->buffer->len)
{
- if ((c->buffer->cur().mask & c->lookup_mask) &&
- digest->may_have (c->buffer->cur().codepoint) &&
+ if (digest->may_have (c->buffer->cur().codepoint) &&
+ (c->buffer->cur().mask & c->lookup_mask) &&
apply_once (c))
ret = true;
else
c->buffer->idx = c->buffer->len - 1;
do
{
- if ((c->buffer->cur().mask & c->lookup_mask) &&
- digest->may_have (c->buffer->cur().codepoint) &&
+ if (digest->may_have (c->buffer->cur().codepoint) &&
+ (c->buffer->cur().mask & c->lookup_mask) &&
apply_once (c))
ret = true;
else