Skip to content

Preallocate result array size in xpath #12105

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

Merged
merged 1 commit into from
Sep 2, 2023
Merged

Conversation

nielsdos
Copy link
Member

@nielsdos nielsdos commented Sep 1, 2023

We know what size they're going to be, and we know they are packed arrays. Prevent reallocations and initialisation overhead by setting the initial size and initializing it as packed from the start.

We know what size they're going to be, and we know they are packed
arrays. Prevent reallocations and initialisation overhead by setting the
initial size and initializing it as packed from the start.
@Girgias
Copy link
Member

Girgias commented Sep 2, 2023

Don't know if you want to merge this into 8.3?

@nielsdos
Copy link
Member Author

nielsdos commented Sep 2, 2023

So this might be me just being unfamiliar with the process. I thought performance improvements (§) always go into master? Isn't 8.3 now only for bugfixes?
(§) I guess unless they fix a regression.

@Girgias
Copy link
Member

Girgias commented Sep 2, 2023

Ehhhh I don't really know, I seem to remember having merged some mbstring optimisations during the RC phase but I might be misremembering

@nielsdos
Copy link
Member Author

nielsdos commented Sep 2, 2023

Hm alright, I'm going to put this in master then. Thanks for checking.

@nielsdos nielsdos merged commit 4dea42a into php:master Sep 2, 2023
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.

2 participants