diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-04-28 14:13:12 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-04-28 14:13:12 +0300 |
commit | c88be6aee1f5127b9017812bdcfecb335e6e5d4c (patch) | |
tree | 8e167931ced8567edf7f3cf8a6221dddd87fe9e2 /ext/json | |
parent | 8a719c1b12f16e22fd71ff993b64ebfc4e5d67be (diff) | |
download | php-git-c88be6aee1f5127b9017812bdcfecb335e6e5d4c.tar.gz |
Bit check micro-optimization
Diffstat (limited to 'ext/json')
-rw-r--r-- | ext/json/json_encoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/json_encoder.c b/ext/json/json_encoder.c index 6c288a11c7..3ec12b8968 100644 --- a/ext/json/json_encoder.c +++ b/ext/json/json_encoder.c @@ -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) { |