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

more c++20 changes #751

Merged
merged 1 commit into from
Oct 10, 2024
Merged

more c++20 changes #751

merged 1 commit into from
Oct 10, 2024

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Oct 6, 2024

Before landing, let's benchmark these changes first.

Before

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark                                  Time             CPU   Iterations        GHz cycle/byte cycles/url instructions/byte instructions/cycle instructions/ns instructions/url     ns/url      speed  time/byte   time/url      url/s
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BasicBench_AdaURL_href                  2153 ns         2153 ns       320225    4.96471    12.2248   1.17222k           54.5643            4.46341         22.1595         5.23211k    236.111 400.773M/s  2.49518ns   239.26ns 4.17956M/s
BasicBench_AdaURL_aggregator_href       1325 ns         1325 ns       528206     6.2136          9        863           40.2665            4.47406            27.8         3.86111k    138.889 651.459M/s  1.53502ns  147.191ns  6.7939M/s
BasicBench_AdaURL_CanParse               941 ns          941 ns       746802    7.36229    7.46466    715.778           32.5736            4.36371         32.1269         3.12344k    97.2222 916.842M/s   1.0907ns  104.586ns  9.5615M/s
BasicBench_whatwg                       4290 ns         4290 ns       163228    4.04824    19.9363   1.91167k           97.5458            4.89288         19.8075         9.35356k    472.222 201.168M/s  4.97097ns  476.661ns 2.09793M/s
BasicBench_CURL                        10923 ns        10923 ns        64140    3.55464    44.6246     4.279k           218.458            4.89546         17.4016         20.9477k   1.20378k 79.0072M/s  12.6571ns  1.21367us 823.945k/s

After

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark                                  Time             CPU   Iterations        GHz cycle/byte cycles/url instructions/byte instructions/cycle instructions/ns instructions/url     ns/url      speed  time/byte   time/url      url/s
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BasicBench_AdaURL_href                  2114 ns         2114 ns       329982    4.74682    11.6883   1.12078k           54.4114             4.6552         22.0974         5.21744k    236.111 408.175M/s  2.44993ns  234.921ns 4.25675M/s
BasicBench_AdaURL_aggregator_href       1316 ns         1316 ns       532931    5.98296    8.95017    858.222           40.2317            4.49508         26.8939         3.85778k    143.444 655.743M/s  1.52499ns  146.229ns 6.83857M/s
BasicBench_AdaURL_CanParse               927 ns          927 ns       756086    7.08914    7.18772    689.222           32.5075            4.52265         32.0617         3.11711k    97.2222 931.106M/s  1.07399ns  102.984ns 9.71026M/s
BasicBench_whatwg                       4222 ns         4222 ns       165047    4.06739    19.4415   1.86422k           97.5666            5.01848         20.4121         9.35556k    458.333  204.41M/s  4.89212ns    469.1ns 2.13174M/s
BasicBench_CURL                        10893 ns        10893 ns        64409    3.53916    44.0857   4.22733k           218.525            4.95682          17.543         20.9541k   1.19444k 79.2276M/s  12.6219ns   1.2103us 826.244k/s

@lemire
Copy link
Member

lemire commented Oct 7, 2024

@anonrig My comments were confused above. I still recommend you change the update_base_search function signature if you are expecting an r-value.

@anonrig anonrig merged commit 37c4997 into main Oct 10, 2024
28 checks passed
@anonrig anonrig deleted the more-cpp-20 branch October 10, 2024 13:51
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