Skip to content

optimize can_parse even further - #1111

Merged
anonrig merged 1 commit into
yagiz/optimize-canparsefrom
yagiz/optimize-canparse-v2
Mar 31, 2026
Merged

anonrig merged 1 commit into
yagiz/optimize-canparsefrom
yagiz/optimize-canparse-v2

Conversation

@anonrig

@anonrig anonrig commented Mar 31, 2026

Copy link
Copy Markdown
Member

DO NOT MERGE YET.

@codecov

codecov Bot commented Mar 31, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 52.38095% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.60%. Comparing base (baa061d) to head (ccbe0cd).

Files with missing lines Patch % Lines
src/implementation.cpp 58.49% 1 Missing and 21 partials ⚠️
src/parser.cpp 20.00% 4 Missing and 4 partials ⚠️

❌ Your patch check has failed because the patch coverage (52.38%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@                     Coverage Diff                     @@
##           yagiz/optimize-canparse    #1111      +/-   ##
===========================================================
- Coverage                    59.74%   59.60%   -0.14%     
===========================================================
  Files                           37       37              
  Lines                         5954     5961       +7     
  Branches                      2903     2906       +3     
===========================================================
- Hits                          3557     3553       -4     
- Misses                         595      600       +5     
- Partials                      1802     1808       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed

codspeed Bot commented Mar 31, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 24.53%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 3 improved benchmarks
✅ 24 untouched benchmarks
⏩ 4 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ BBC_BasicBench_AdaURL_CanParse 4.2 µs 3.4 µs +22.29%
⚡ Bench_BasicBench_AdaURL_CanParse 14.3 µs 13.5 µs +6.3%
⚡ BenchData_BasicBench_AdaURL_CanParse 27 ms 21.7 ms +24.53%

Comparing yagiz/optimize-canparse-v2 (8d27f3e) with yagiz/optimize-canparse (baa061d)

Open in CodSpeed

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@anonrig
anonrig force-pushed the yagiz/optimize-canparse-v2 branch from ccbe0cd to 8d27f3e Compare March 31, 2026 19:58
@anonrig
anonrig merged commit 5376065 into yagiz/optimize-canparse Mar 31, 2026
58 of 59 checks passed
@anonrig
anonrig deleted the yagiz/optimize-canparse-v2 branch March 31, 2026 19:59
anonrig added a commit that referenced this pull request Apr 5, 2026
* optimize url::can_parse method

* update clang-tools to 22

* create AGENTS.md

* remove unused methods

* update comments & abi-check

* bump SOVERSION to 5 for intentional ABI break

* fix clang-tidy-22 warnings: noexcept-escape, unchecked-optional-access, throwing-static-init

* address fuzzing issues

* fix throwing-static-init false positive and add clang-tidy to run-clangcldocker.sh

* fix docker clang-tidy: generate compile_commands.json on host, run tidy in container

* fix gen_compile_commands: drop -stdlib=libc++ when using host GCC

* wipe stale cmake cache before gen_compile_commands to drop old CXX_FLAGS

* fix docker clang-tidy: install cmake+ninja in container, use clang++-22 to match CI exactly

* wipe build-clang-tidy before docker cmake to avoid generator mismatch

* install clang-22 and libc++-22-dev in docker tidy container

* reduce apt-get verbosity with -qq flag

* add git to docker deps for CPM to clone gtest

* suppress apt/docker verbosity, fix SSL certs, cache CPM downloads on host

* exclude vendored gtest from clang-tidy and update ExcludeHeaderFilterRegex

* scope clang-tidy to src/ only, fix git safe.directory, simplify docker setup

* fix all clang-tidy issues: scope to ada.cpp, NOLINT false positives, fix stringview usage, update AGENTS.md

* remove .cpm-cache from repo, add to .gitignore

* add regression tests for extra-slash fuzzer crashes (ws:///..., ws://////5...)

* fix % in host: return nullopt to defer to full parser; add regression tests for all fuzzer crashes

* fix port leading-zeros: strip zeros before pl>5 check; add regression tests

* fix IPv4 fast path bypassing port validation; add regression test

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* add shortcuts for can_parse slow path

* optimize even further (#1111)

* Fix error in optimized can_parse (#1118)

* Improve consistency in optimized can_parse (#1119)

---------

Co-authored-by: Carlos Sousa <40635471+CarlosEduR@users.noreply.github.com>
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