Skip to content

ext/zip: Preinitialize arrays when size is known#21572

Merged
Girgias merged 1 commit intophp:masterfrom
LamentXU123:optimize-zip
Apr 6, 2026
Merged

ext/zip: Preinitialize arrays when size is known#21572
Girgias merged 1 commit intophp:masterfrom
LamentXU123:optimize-zip

Conversation

@LamentXU123
Copy link
Copy Markdown
Contributor

@LamentXU123 LamentXU123 commented Mar 29, 2026

same as #21560. In those cases the length is already known, then we can directly use array_init_size for some speed-up optimization.

Copy link
Copy Markdown
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

LGTM. Pinging @remicollet as I don't remember how the maintenance in regards to the external extension works again.

@LamentXU123
Copy link
Copy Markdown
Contributor Author

LGTM. Pinging @remicollet as I don't remember how the maintenance in regards to the external extension works again.

This may be similar to #21458 🤔

@Girgias Girgias merged commit 7d5847d into php:master Apr 6, 2026
19 checks passed
@Girgias
Copy link
Copy Markdown
Member

Girgias commented Apr 6, 2026

Well if that PR is merged then we might as well.

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