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

migrate to c++20 #726

Merged
merged 11 commits into from
Sep 3, 2024
Merged

migrate to c++20 #726

merged 11 commits into from
Sep 3, 2024

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Sep 2, 2024

Summary

  • Updates codebase to use C++20
  • Removes testing on gcc 10 and clang 10

Benchmarks

Running benchmarks with sudo build/benchmarks/bbc_bench

Before

--------------------------------------------------------------------------------------------
Benchmark                                  Time             CPU   Iterations UserCounters...
--------------------------------------------------------------------------------------------
BasicBench_AdaURL_href                  2205 ns         2205 ns       314272 GHz=4.81764 cycle/byte=12.0915 cycles/url=1.15944k instructions/byte=57.0452 instructions/cycle=4.71778 instructions/ns=22.7285 instructions/url=5.47k ns/url=240.667 speed=391.386M/s time/byte=2.55502ns time/url=244.998ns url/s=4.08166M/s
BasicBench_AdaURL_aggregator_href       1371 ns         1370 ns       516598 GHz=5.77944 cycle/byte=8.927 cycles/url=856 instructions/byte=40.6014 instructions/cycle=4.54816 instructions/ns=26.2858 instructions/url=3.89322k ns/url=148.111 speed=629.99M/s time/byte=1.58733ns time/url=152.207ns url/s=6.57M/s
BasicBench_AdaURL_CanParse               987 ns          987 ns       708179 GHz=7.05344 cycle/byte=7.49479 cycles/url=718.667 instructions/byte=33.2306 instructions/cycle=4.43383 instructions/ns=31.2737 instructions/url=3.18644k ns/url=101.889 speed=874.13M/s time/byte=1.14399ns time/url=109.696ns url/s=9.11607M/s
BasicBench_whatwg                       4341 ns         4341 ns       160950 GHz=4.01934 cycle/byte=19.9849 cycles/url=1.91633k instructions/byte=98.9224 instructions/cycle=4.94985 instructions/ns=19.8951 instructions/url=9.48556k ns/url=476.778 speed=198.82M/s time/byte=5.02967ns time/url=482.29ns url/s=2.07344M/s
BasicBench_CURL                        10698 ns        10690 ns        65995 GHz=3.51628 cycle/byte=43.8007 cycles/url=4.2k instructions/byte=214.015 instructions/cycle=4.88611 instructions/ns=17.1809 instructions/url=20.5217k ns/url=1.19444k speed=80.7275M/s time/byte=12.3873ns time/url=1.18781us url/s=841.886k/s

After

--------------------------------------------------------------------------------------------
Benchmark                                  Time             CPU   Iterations UserCounters...
--------------------------------------------------------------------------------------------
BasicBench_AdaURL_href                  2138 ns         2138 ns       326689 GHz=4.86541 cycle/byte=11.9803 cycles/url=1.14878k instructions/byte=55.2283 instructions/cycle=4.60992 instructions/ns=22.4292 instructions/url=5.29578k ns/url=236.111 speed=403.656M/s time/byte=2.47735ns time/url=237.551ns url/s=4.20963M/s
BasicBench_AdaURL_aggregator_href       1331 ns         1331 ns       528905 GHz=5.65641 cycle/byte=8.73696 cycles/url=837.778 instructions/byte=40.5713 instructions/cycle=4.64363 instructions/ns=26.2663 instructions/url=3.89033k ns/url=148.111 speed=648.612M/s time/byte=1.54175ns time/url=147.837ns url/s=6.7642M/s
BasicBench_AdaURL_CanParse               949 ns          949 ns       735325 GHz=6.85153 cycle/byte=7.27231 cycles/url=697.333 instructions/byte=32.993 instructions/cycle=4.53681 instructions/ns=31.0841 instructions/url=3.16367k ns/url=101.778 speed=909.01M/s time/byte=1.1001ns time/url=105.487ns url/s=9.47983M/s
BasicBench_whatwg                       4372 ns         4371 ns       160182 GHz=4.03122 cycle/byte=20.0487 cycles/url=1.92244k instructions/byte=98.445 instructions/cycle=4.9103 instructions/ns=19.7945 instructions/url=9.43978k ns/url=476.889 speed=197.427M/s time/byte=5.06515ns time/url=485.692ns url/s=2.05892M/s
BasicBench_CURL                        10625 ns        10624 ns        65867 GHz=3.60184 cycle/byte=43.9942 cycles/url=4.21856k instructions/byte=214.057 instructions/cycle=4.86557 instructions/ns=17.525 instructions/url=20.5257k ns/url=1.17122k speed=81.2314M/s time/byte=12.3105ns time/url=1.18044us url/s=847.141k/s

Copy link
Member

@lemire lemire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this should be first release as a major release as it will break existing code.

@lemire
Copy link
Member

lemire commented Sep 2, 2024

@anonrig I recommend you bump this version:

VERSION 1.14.0

@anonrig
Copy link
Member Author

anonrig commented Sep 2, 2024

hey @mikea, do you know by any chance how to fix the fuzzer (oss-fuzz) to compile with C++20? even after adding -std=c++20, it still uses c++17

@lemire
Copy link
Member

lemire commented Sep 2, 2024

@anonrig I suggest merging. This is a non-blocking technical issue.

If you introduced a bug (very unlikely) we can fix it later.

@anonrig
Copy link
Member Author

anonrig commented Sep 2, 2024

@lemire before merging this, should we release a new version with @CarlosEduR's changes?

@anonrig
Copy link
Member Author

anonrig commented Sep 3, 2024

I created a new release for v2.9.2. Once the github release is available, we can merge this.

@anonrig anonrig merged commit 7f1a843 into main Sep 3, 2024
27 of 30 checks passed
@anonrig anonrig deleted the c++20 branch September 3, 2024 00:43
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