Skip to content

Optimize name to wire conversion #29

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

Closed
k0ekk0ek opened this issue Feb 20, 2023 · 0 comments
Closed

Optimize name to wire conversion #29

k0ekk0ek opened this issue Feb 20, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@k0ekk0ek
Copy link
Contributor

Converting names from text representation to wire format is a relatively straightforward. i.e. foo.bar. is represented in wire format as 3foo3bar0 and since zone files contain domain names for the most part, optimizing this process results in a very significant performance boost. An rudimentary initial attempt can be found here.

Obviously, in the linked attempt, the escaped code is commented out. Currently, I'm of the opinion that the algorithm outlined in #20 may work for names too. So, get token, scan for end-of-token/escape sequences and dots and copy the name into a buffer. Keep the mask for dots around so that after the name has been copied all dots can be replaced by the corresponding label length.

@k0ekk0ek k0ekk0ek added enhancement New feature or request help wanted Extra attention is needed labels Feb 20, 2023
@k0ekk0ek k0ekk0ek added this to the Release 0.1.0 milestone Feb 20, 2023
@k0ekk0ek k0ekk0ek self-assigned this Feb 23, 2023
k0ekk0ek added a commit to k0ekk0ek/simdzone that referenced this issue Mar 1, 2023
Add a fallback implementation to support architectures for which no SIMD
implementation is available yet. Sources have been reorganized to allow
for easy optimization per target. Closes NLnetLabs#4.

Use longjmp for error handling. Closes NLnetLabs#1.

Add zone-bench to allow for convenient benchmarking.

Vectorize string to wire conversion. Closes NLnetLabs#20.

Vectorize name to wire conversion. Closes NLnetLabs#29.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant