Skip to content

Perf[ntsa_domainname.h]: improve CPU cache locality - #383

Merged
mattrm456 merged 1 commit into
bloomberg:mainfrom
678098:patch-4
Sep 16, 2026
Merged

mattrm456 merged 1 commit into
bloomberg:mainfrom
678098:patch-4

Conversation

@678098

@678098 678098 commented May 13, 2026

Copy link
Copy Markdown
Contributor

Place domain name size before buffer to improve CPU cache locality.

With short domain names (less than 60 bytes), the accessed data fits into just 1 CPU cache line that is 64 bytes.
The existing implementation guarantees that 2 cache lines will be used, because we have to access the data in the beginning of d_buffer and access d_size that are 256 bytes apart from each other.

Place domain name size before buffer to improve CPU cache locality.
@mattrm456
mattrm456 merged commit 36cdcbf into bloomberg:main Sep 16, 2026
1 check passed
@678098
678098 deleted the patch-4 branch September 16, 2026 18:33
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.

2 participants