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

Force a upb_MiniTable and its fields to be contiguous in memory. #20160

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

copybara-service[bot]
Copy link

Force a upb_MiniTable and its fields to be contiguous in memory.

The default size for an empty arena is 256 bytes; if a minidescriptor is 20 bytes long, the arena will allocate another separate block for the minitable fields, which depending on the allocator could increase TLB pressure.

I did try implementing this as a flexible array member on upb_MiniTable, but unfortunately that's already used for the fasttable members, and it actually inexplicably showed tiny perf regressions in parsing benchmarks.

The default size for an empty arena is 256 bytes; if a minidescriptor is 20 bytes long, the arena will allocate another separate block for the minitable fields, which depending on the allocator could increase TLB pressure.

I did try implementing this as a flexible array member on `upb_MiniTable`, but unfortunately  that's already used for the fasttable members, and it actually inexplicably showed tiny perf regressions in parsing benchmarks.

PiperOrigin-RevId: 720815985
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant