mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Optimize smart_str_append_scalar() for true/false
There is no point in having both cases together just to branch on them again to figure out what to print.
This commit is contained in:
@@ -208,8 +208,11 @@ ZEND_API void ZEND_FASTCALL smart_str_append_scalar(smart_str *dest, const zval
|
||||
break;
|
||||
|
||||
case IS_TRUE:
|
||||
smart_str_appendl(dest, "true", sizeof("true")-1);
|
||||
break;
|
||||
|
||||
case IS_FALSE:
|
||||
smart_str_appends(dest, Z_TYPE_P(value) == IS_TRUE ? "true" : "false");
|
||||
smart_str_appendl(dest, "false", sizeof("false")-1);
|
||||
break;
|
||||
|
||||
case IS_DOUBLE:
|
||||
|
||||
Reference in New Issue
Block a user