[php-src] PR #16350: Use SWAR to seek for non-ASCII UTF-8 in DOM parsing
| From: | nielsdos | Date: | Thu, 10 Oct 2024 21:27:14 +0000 |
| Subject: | [php-src] PR #16350: Use SWAR to seek for non-ASCII UTF-8 in DOM parsing | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-29140@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/16350
Author: nielsdos
GitHub FYP test case:
```
Benchmark 1: ./sapi/cli/php test.php
Time (mean ± σ): 502.8 ms ± 6.2 ms [User: 498.3 ms, System: 3.2 ms]
Range (min … max): 495.2 ms … 509.8 ms 10 runs
Benchmark 2: ./sapi/cli/php_old test.php
Time (mean ± σ): 518.4 ms ± 4.3 ms [User: 513.9 ms, System: 3.2 ms]
Range (min … max): 511.5 ms … 525.5 ms 10 runs
Summary
./sapi/cli/php test.php ran
1.03 ± 0.02 times faster than ./sapi/cli/php_old test.php
```
Wikipedia English homepage test case:
```
Benchmark 1: ./sapi/cli/php test.php
Time (mean ± σ): 301.1 ms ± 4.2 ms [User: 295.5 ms, System: 4.8 ms]
Range (min … max): 296.3 ms … 308.8 ms 10 runs
Benchmark 2: ./sapi/cli/php_old test.php
Time (mean ± σ): 308.2 ms ± 1.7 ms [User: 304.6 ms, System: 2.9 ms]
Range (min … max): 306.9 ms … 312.8 ms 10 runs
Summary
./sapi/cli/php test.php ran
1.02 ± 0.02 times faster than ./sapi/cli/php_old test.php
```