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

Improve IsFQDN performance #1453

Merged
merged 2 commits into from
Apr 27, 2023
Merged

Improve IsFQDN performance #1453

merged 2 commits into from
Apr 27, 2023

Commits on Apr 18, 2023

  1. Improve IsFQDN performance

    While this code may be slightly less clear, it's significantly faster
    and this function seems to be a hot path for certain workloads.
    
    name                 old time/op    new time/op    delta
    IsFQDN/no_dot-12       5.86ns ± 2%    1.48ns ± 3%  -74.71%  (p=0.000 n=10+10)
    IsFQDN/unescaped-12    8.73ns ± 2%    1.57ns ± 1%  -81.98%  (p=0.000 n=9+8)
    IsFQDN/escaped-12      27.4ns ± 2%    23.8ns ± 2%  -13.19%  (p=0.000 n=10+10)
    FQDN/is_fqdn-12        8.36ns ± 1%    1.80ns ± 2%  -78.50%  (p=0.000 n=9+10)
    FQDN/not_fqdn-12       36.8ns ±15%    33.4ns ±12%   -9.25%  (p=0.035 n=10+10)
    tmthrgd committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    b5a7647 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2023

  1. Fixup IsFQDN comment

    tmthrgd committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    2a1914d View commit details
    Browse the repository at this point in the history