Skip to content

Conversation

@ndossche
Copy link
Member

@ndossche ndossche commented Nov 8, 2025

Shrinks the code size from 682 to 601 bytes on x86-64 with GCC 15.2.1. Does not make a difference in performance, at least on my i7-4790. I also tried specialising the pack logic like I did with str_split(), but that is a hit or miss in performance improvement depending on the length. It seems that the instruction cache is become too full, and the fact that add_next_index_zval() and zend_hash_next_index_insert() use the same code internally is beneficial.

Shrinks the code size from 682 to 601 bytes on x86-64 with GCC 15.2.1.
Does not make a difference in performance, at least on my i7-4790.
I also tried specialising the pack logic like I did with str_split(),
but that is a hit or miss in performance improvement depending on the
length. It seems that the instruction cache is become too full, and the
fact that add_next_index_zval() and zend_hash_next_index_insert() use
the same code internally is beneficial.
@ndossche ndossche marked this pull request as ready for review November 8, 2025 13:38
@ndossche ndossche requested a review from bukka as a code owner November 8, 2025 13:38
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