Skip to content

Update name_to_dnswire_loop #83

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

Merged
merged 1 commit into from
Aug 30, 2023
Merged

Update name_to_dnswire_loop #83

merged 1 commit into from
Aug 30, 2023

Conversation

k0ekk0ek
Copy link
Contributor

This updates my take on the function and gives it a slight boost. It's still somewhat slower for the top-1m.csv, but faster for just benchmark or a csv of all owners in the .se zone. What's interesting is that the prefix-minimum is quite a bit slower than any of the simdjson-like approaches for both benchmark and .se.

$ ./benchmark top-1m.csv
loaded 1000000 names
average length 25.5398 bytes/name
string with lengths between 0 and 31 : 770551 (77.06 %)
string with lengths between 32 and 63 : 203682 (20.37 %)
string with lengths between 64 and 95 : 22182 (2.22 %)
string with lengths between 96 and 127 : 1622 (0.16 %)
string with lengths between 128 and 159 : 517 (0.05 %)
string with lengths between 160 and 191 : 490 (0.05 %)
string with lengths between 192 and 223 : 464 (0.05 %)
string with lengths between 224 and 255 : 492 (0.05 %)

name_to_dnswire_idx_avx is simdjson-like
name_to_dnswire_avx is Prefix-Minimum
name_to_dnswire is conventional

name_to_dnswire_idx_avx512     :   2.01 GB/s   78.6 Ma/s  12.72 ns/d   3.79 GHz  48.15 c/d  65.33 i/d    1.9 c/b   2.56 i/b   1.36 i/c 
name_to_dnswire_idx_avx        :   1.98 GB/s   77.5 Ma/s  12.90 ns/d   3.87 GHz  49.87 c/d  80.71 i/d    2.0 c/b   3.16 i/b   1.62 i/c 
name_to_dnswire_loop           :   1.74 GB/s   68.2 Ma/s  14.67 ns/d   3.87 GHz  56.73 c/d  87.07 i/d    2.2 c/b   3.41 i/b   1.53 i/c 
name_to_dnswire_avx            :   2.21 GB/s   86.7 Ma/s  11.53 ns/d   3.86 GHz  44.54 c/d  80.14 i/d    1.7 c/b   3.14 i/b   1.80 i/c 
name_to_dnswire_simd           :   2.03 GB/s   79.5 Ma/s  12.58 ns/d   3.86 GHz  48.59 c/d  113.62 i/d    1.9 c/b   4.45 i/b   2.34 i/c 
name_to_dnswire_scalar_labels  :   1.33 GB/s   52.0 Ma/s  19.22 ns/d   3.86 GHz  74.27 c/d  119.43 i/d    2.9 c/b   4.68 i/b   1.61 i/c 
name_to_dnswire                :   0.63 GB/s   24.5 Ma/s  40.83 ns/d   3.83 GHz  156.45 c/d  258.27 i/d    6.1 c/b  10.11 i/b   1.65 i/c

@lemire lemire merged commit b49a304 into lemire:master Aug 30, 2023
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