Skip to content

Commit d9f84e7

Browse files
committed
little optim attempt
using just shift with integer rather than scalar integer to float conversion (shlr vs cvtsi2sd then mulsd on intel)
1 parent 9d7b6bd commit d9f84e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ ZEND_API ZEND_COLD void zend_error_zstr_at(
14941494
} else {
14951495
errors_size = (size_t *)(EG(errors) - 1);
14961496
if (EG(num_errors) == *errors_size) {
1497-
size_t tmp = *errors_size * 1.5;
1497+
size_t tmp = *errors_size + (*errors_size >> 1);
14981498
// not sure we can get high number of errors so safe `might be` over cautious here
14991499
errors_size = safe_erealloc(errors_size, sizeof(size_t) + (tmp * sizeof(zend_error_info *)), 1, 0);
15001500
*errors_size = tmp;

0 commit comments

Comments
 (0)