Skip to content

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

Open
678098 wants to merge 1 commit into
bloomberg:mainfrom
678098:patch-4
Open

Perf[ntsa_domainname.h]: improve CPU cache locality#383
678098 wants to merge 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.
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