Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applied ArraySpreadInsteadOfArrayMergeRector #7319

Conversation

weirdan
Copy link
Collaborator

@weirdan weirdan commented Jan 6, 2022

Blocked by #7296

@weirdan weirdan added the release:internal The PR will be included in 'Internal changes' section of the release notes label Jan 6, 2022
@weirdan weirdan added this to the Psalm 5 milestone Jan 6, 2022
@weirdan weirdan requested a review from orklah January 6, 2022 04:38
@orklah
Copy link
Collaborator

orklah commented Jan 6, 2022

Oh, I didn't jnow that one.

Do we know if there's performance considerations here?

@weirdan
Copy link
Collaborator Author

weirdan commented Jan 6, 2022

From my testing, it seems the function call is slightly slower.

I ran tests/Internal/CallMapTest.php 10 times on master and this branch:

$ time php-noxdebug vendor/bin/phpunit --repeat=10 tests/Internal/CallMapTest.php
PHPUnit 9.5.11 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.1.1-dev
Configuration: /home/weirdan/src/psalm/psalm/phpunit.xml
Random Seed:   1641442685

...............................................................  63 / 150 ( 42%)
............................................................... 126 / 150 ( 84%)
........................                                        150 / 150 (100%)

Time: 03:05.184, Memory: 72.00 MB

OK (150 tests, 1575360 assertions)
user=185.23s system=0.13s cpu=99% total=3:05.38

$ git co rector-ArraySpreadInsteadOfArrayMergeRector
M	composer.json
Switched to branch 'rector-ArraySpreadInsteadOfArrayMergeRector'

$ php-noxdebug vendor/bin/phpunit --repeat=10 tests/Internal/CallMapTest.php
PHPUnit 9.5.11 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.1.1-dev
Configuration: /home/weirdan/src/psalm/psalm/phpunit.xml
Random Seed:   1641442981

...............................................................  63 / 150 ( 42%)
............................................................... 126 / 150 ( 84%)
........................                                        150 / 150 (100%)

Time: 03:01.241, Memory: 70.00 MB

OK (150 tests, 1575360 assertions)
user=181.31s system=0.12s cpu=99% total=3:01.45

The difference seems to be ~3% in this case, but I can't say how representative is that.

@orklah
Copy link
Collaborator

orklah commented Jan 6, 2022

It's at least an indication of non-worsening so that's fine by me :)

@orklah
Copy link
Collaborator

orklah commented Jul 29, 2022

@weirdan this should not be blocked anymore if you have time to rebase it

@weirdan
Copy link
Collaborator Author

weirdan commented Jul 30, 2022

Superseded by #8345

@weirdan weirdan closed this Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: blocked release:internal The PR will be included in 'Internal changes' section of the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants