Skip to content

Commit 821a02e

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 3f050cb commit 821a02e

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
@@ -1500,7 +1500,7 @@ ZEND_API ZEND_COLD void zend_error_zstr_at(
15001500
} else {
15011501
errors_size = (size_t *)(EG(errors) - 1);
15021502
if (EG(num_errors) == *errors_size) {
1503-
size_t tmp = *errors_size * 1.5;
1503+
size_t tmp = *errors_size + (*errors_size >> 1);
15041504
// not sure we can get high number of errors so safe `might be` over cautious here
15051505
errors_size = safe_erealloc(errors_size, sizeof(size_t) + (tmp * sizeof(zend_error_info *)), 1, 0);
15061506
*errors_size = tmp;

0 commit comments

Comments
 (0)