You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
S_scan_str() calls memEQ() a bunch of times. The general case is that
the strings are multiple bytes long, but most of the time, at least one
of the operands will be just a single byte. We can avoid a libc call by
just comparing the single bytes when the length is 1.
Tony Cook is of the opinion that other uses of memEQ() will more likely
be multiple bytes, so adding this check to all calls would not be
beneficial. I looked through the core source, and agree. So this adds
a macro that tests for a single byte, and if multiple calls plain
memEQ().
Spotted by Daniel Dragan
Since the tokenizer is not hot code, this won't make a noticeable
difference in performance. I think the reason to do it is mainly to
show it has been done for people in the future who would otherwise come
along and notice this
0 commit comments