Bit check micro-optimization

This commit is contained in:
Dmitry Stogov 2018-04-28 14:13:12 +03:00
parent 8a719c1b12
commit c88be6aee1
6 changed files with 16 additions and 16 deletions

View file

@ -350,7 +350,7 @@ static int php_json_escape_string(
0xffffffff, 0x500080c4, 0x10000000, 0x00000000};
pos++;
if (EXPECTED(!(charmap[us >> 5] & (1 << (us & 0x1f))))) {
if (EXPECTED(!((charmap[us >> 5] >> (us & 0x1f)) & 1))) {
smart_str_appendc(buf, (unsigned char) us);
} else {
switch (us) {