Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Sep 4, 2025

5 2% faster in phpstan/phpstan#13425

@ondrejmirtes
Copy link
Contributor

Is it still 5% after phpstan/phpstan-src#4268?

@staabm
Copy link
Contributor Author

staabm commented Sep 4, 2025

with this PR

➜  bug13425 git:(2.1.x) ✗ hyperfine '../../bin/phpstan analyze src/ plugins/' -i
Benchmark 1: ../../bin/phpstan analyze src/ plugins/
  Time (mean ± σ):     272.4 ms ±   1.7 ms    [User: 234.5 ms, System: 35.1 ms]
  Range (min … max):   269.6 ms … 275.0 ms    11 runs
 
  Warning: Ignoring non-zero exit code.

before this PR

➜  bug13425 git:(2.1.x) ✗ hyperfine '../../bin/phpstan analyze src/ plugins/' -i
Benchmark 1: ../../bin/phpstan analyze src/ plugins/
  Time (mean ± σ):     278.5 ms ±   3.4 ms    [User: 241.0 ms, System: 35.0 ms]
  Range (min … max):   274.5 ms … 286.7 ms    10 runs
 
  Warning: Ignoring non-zero exit code.

tested on latest macOS


 
➜  bug13425 git:(2.1.x) ✗ php -v
PHP 8.3.25 (cli) (built: Aug 26 2025 15:05:30) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.25, Copyright (c) Zend Technologies

-> so its only 2-3% after phpstan/phpstan-src#4268

@ondrejmirtes
Copy link
Contributor

Yeah the absolutes of these percentages get much smaller once you solve the root cause and do much less in total 😊

Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although I really wish PHP became a bit faster in handling array_map() 🙄

@Ocramius Ocramius self-assigned this Sep 4, 2025
@Ocramius Ocramius added this to the 6.62.0 milestone Sep 4, 2025
@Ocramius Ocramius merged commit 46a3946 into Roave:6.62.x Sep 4, 2025
37 checks passed
@staabm staabm deleted the faster branch September 5, 2025 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants