Skip to content

Conversation

@ndossche
Copy link
Member

Gives about a 1.1-1.2% performance win on Symfony demo.
Spit over various commits with short reasoning. Once merged, can be squashed into one with the commit descriptions and titles in a single commit.

Copy link
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

Comment on lines +1321 to +1323
zval tmp;
ZVAL_NULL(&tmp);
zend_hash_next_index_insert_new(match_sets[i], &tmp);
Copy link
Member

Choose a reason for hiding this comment

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

We really should add zend_hash APIs to deal with those cases.
We have add_index_*() and add_assoc_*() when the array is wrapped in a zval but nothing when working with a HashTable directly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably, but it's worth checking first if this occurs often before adding more public APIs. I don't know off the top of my head how common this is.
In any case, I'm not gonna deal with it in this PR :p

@ndossche ndossche merged commit 1e2e2f3 into php:master Oct 16, 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