We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c41ad3 commit 40cd08fCopy full SHA for 40cd08f
ext/json/json_encoder.c
@@ -585,11 +585,14 @@ static zend_always_inline php_json_simd_result php_json_process_simd_block(
585
*s += *pos;
586
const char *s_backup = *s;
587
588
+ /* It's more important to keep this loop tight than to optimize this with
589
+ * a trailing zero count. */
590
for (; mask; mask >>= 1, *s += 1) {
591
if (UNEXPECTED(mask & 1)) {
592
bool handled = php_json_printable_ascii_escape(buf, (*s)[0], options);
593
ZEND_ASSERT(handled);
594
} else {
595
+ ZEND_ASSERT(buf->s);
596
smart_str_appendc(buf, (*s)[0]);
597
}
598
0 commit comments