Skip to content

Improve performance of Exporter::exportString()#64

Merged
sebastianbergmann merged 1 commit intosebastianbergmann:mainfrom
staabm:exp-string
Jun 18, 2024
Merged

Improve performance of Exporter::exportString()#64
sebastianbergmann merged 1 commit intosebastianbergmann:mainfrom
staabm:exp-string

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Jun 18, 2024

remove a unnecessary function call in the hot path.

repro from sebastianbergmann/phpunit#5774 (comment) gets 6% faster

grafik

@staabm staabm changed the title Faster Exporter-> exportString() Faster Exporter->exportString() Jun 18, 2024
@staabm staabm marked this pull request as ready for review June 18, 2024 09:58
}

return "'" .
str_replace(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

before the PR we processed each string twice.

@sebastianbergmann sebastianbergmann merged commit 8474a9e into sebastianbergmann:main Jun 18, 2024
@sebastianbergmann sebastianbergmann changed the title Faster Exporter->exportString() Improve performance of Exporter::exportString() Jun 18, 2024
@staabm staabm deleted the exp-string branch June 18, 2024 11:31
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.

2 participants