[php-src] PR #14104: Avoid unnecessary number initializations in BCMath
| From: | nielsdos | Date: | Wed, 01 May 2024 15:19:14 +0000 |
| Subject: | [php-src] PR #14104: Avoid unnecessary number initializations in BCMath | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-25978@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/14104
Author: nielsdos
Since freeing can deal with NULL, we can avoid calling bc_init_num and avoid resetting the number
during parsing.
Using benchmark from #14076.
Before:
```
1.544440984726
2.0288550853729
2.092139005661
```
After:
```
1.5324399471283
1.9081380367279
2.065819978714
```