Skip to content

ext/random: Use zend_bin2hex_str for little-endian random state serialization - #23821

Open
LamentXU123 wants to merge 2 commits into
php:masterfrom
LamentXU123:hex2bin
Open

LamentXU123 wants to merge 2 commits into
php:masterfrom
LamentXU123:hex2bin

Conversation

@LamentXU123

Copy link
Copy Markdown
Member

Follow-up #23819

Comment thread ext/random/random.c

@TimWolla TimWolla left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm fairly confident that the BE implementation for random has become (much) slower.

@TimWolla TimWolla left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Actually, probably most of them (but not sure how much it matter for the others).

@LamentXU123

Copy link
Copy Markdown
Member Author

Well I don't think about this performance-wise.

It make sense to have regression. Then, let's turn this PR into that minor optimization and revert the hex2bin change.

@LamentXU123 LamentXU123 changed the title Reuse zend_bin2hex in random, SOAP, LDAP and syslog ext/random: Use zend_bin2hex_str for little-endian random state serialization Sep 21, 2026
@LamentXU123
LamentXU123 requested review from TimWolla and removed request for bukka, devnexen and zeriyoshi September 21, 2026 13:43
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