Skip to content
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

ext/pdo: Rearrange struct to pack and group related fields together #17651

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Jan 31, 2025

All bound related fields are now part of the same cache line

All bound related fields are now part of the same cache line
@Girgias Girgias force-pushed the pdo-stmt-pack-struct branch from 7e1a041 to 9ee935d Compare January 31, 2025 12:06
@Girgias Girgias marked this pull request as ready for review January 31, 2025 12:49
Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

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

This shrinks the struct to 224 bytes on x64 Linux indeed.
I think it's better to swap database_object_handle and dbh as dbh is accessed more frequently together with the rest. Although of course the allocation is likely not aligned to a cache line boundary so it will not make much difference anyway

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