Skip to content

Simplify conversion in BCMath #14157

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
May 7, 2024
Merged

Simplify conversion in BCMath #14157

merged 1 commit into from
May 7, 2024

Conversation

nielsdos
Copy link
Member

@nielsdos nielsdos commented May 6, 2024

This simplifies the code, and also might indirectly improve performance due to a decrease in instruction cache pressure. Although the latter is probably negligible.

This works because 0x30 has no overlapping bits with [0, 9].

Copy link
Member

@SakiTakamachi SakiTakamachi left a comment

Choose a reason for hiding this comment

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

Great!
The logic is reasonable and the performance has clearly increased when measured on my machine.

Please just resolve the conflict :)

This simplifies the code, and also might indirectly improve performance
due to a decrease in instruction cache pressure. Although the latter is
probably negligible.

This works because 0x30 has no overlapping bits with [0, 9].
@nielsdos nielsdos merged commit 90a5b87 into php:master May 7, 2024
10 checks passed
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.

3 participants