Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Dec 17, 2024

we call getNodeKey() several million times in most profiles

after

➜  phpstan-src git:(2.0.x) ✗ hyperfine 'php bin/phpstan analyze --debug src/Rules' -i
Benchmark 1: php bin/phpstan analyze --debug src/Rules
  Time (mean ± σ):     14.899 s ±  0.110 s    [User: 14.583 s, System: 0.310 s]
  Range (min … max):   14.667 s … 15.006 s    10 runs

before

➜  phpstan-src git:(2.0.x) ✗ hyperfine 'php bin/phpstan analyze --debug src/Rules' -i
Benchmark 1: php bin/phpstan analyze --debug src/Rules
  Time (mean ± σ):     14.980 s ±  0.148 s    [User: 14.645 s, System: 0.316 s]
  Range (min … max):   14.844 s … 15.332 s    10 runs

@staabm staabm marked this pull request as ready for review December 17, 2024 08:48
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes
Copy link
Member

This improvement is really negligible, but I don't see a reason against merging this. Thakns.

@ondrejmirtes ondrejmirtes merged commit 9c81a80 into phpstan:1.12.x Dec 17, 2024
454 checks passed
@staabm staabm deleted the attr12 branch December 17, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants