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

Use base64 library by @aklomp #106

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Use base64 library by @aklomp #106

merged 2 commits into from
Nov 10, 2023

Conversation

k0ekk0ek
Copy link
Contributor

@k0ekk0ek k0ekk0ek commented Nov 10, 2023

Use a slightly modified version of @aklomp's generic base64 decoder. While implementing support for ech on #16 (not in RFC, but supported by NSD) I required yet another slightly modified base64 parse function. Instead I opted to pull in the excellent stream decoder. While not leveraging the vectorized implementations yet (#27), using the decoder boosts performance significantly, especially for DNSSEC heavy zones (i.e. .se).

before:

time ./zone-bench -t haswell parse ../../zones/se.zone
Selected target haswell
Parsed 8924051 records

real    0m2.832s
user    0m2.511s
sys     0m0.283s

after:

time ./zone-bench -t haswell parse ../../zones/se.zone
Selected target haswell
Parsed 8924051 records

real    0m1.817s
user    0m1.390s
sys     0m0.274s

I've also added an endian.h that pulls in the system's endian.h if available (not for macOS and Windows). The byteswap routines can be used to avoid use of hton* and ntoh* functions so we don't depend on winsock.h on Microsoft Windows.

@k0ekk0ek k0ekk0ek force-pushed the base64 branch 6 times, most recently from d8a3fa9 to cf9dcb8 Compare November 10, 2023 16:35
@k0ekk0ek k0ekk0ek merged commit 457b505 into NLnetLabs:main Nov 10, 2023
4 checks passed
@k0ekk0ek k0ekk0ek deleted the base64 branch February 8, 2024 09:05
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