Skip to content

protocol: simpler Curl_getn_scheme runs faster - #22658

Closed
bagder wants to merge 20 commits into
masterfrom
bagder/faster-scheme
Closed

bagder wants to merge 20 commits into
masterfrom
bagder/faster-scheme

Conversation

@bagder

@bagder bagder commented Aug 24, 2026

Copy link
Copy Markdown
Member

Iterating unit test 1627 50,000 times show the new version to be ~31% faster on my machine.

  • unit1627: add more test strings, In particular three, five and six letter non-existing schemes.

  • remove scripts/schemetable.c, not used anymore

Iterating unit test 1627 50,000 times show the new version to be ~27%
faster on my machine.

- unit1627: add more test strings, In particular three, five and six letter
  non-existing schemes.

- remove scripts/schemetable.c, not used anymore
@github-actions github-actions Bot added the CI Continuous Integration label Aug 24, 2026
@bagder
bagder marked this pull request as ready for review August 24, 2026 14:27
@bagder
bagder requested a balanced review from Copilot August 24, 2026 14:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Optimizes scheme lookup by replacing the generated hash table with length-specific parsers and expanding unit coverage.

Changes:

  • Adds specialized parsers for two- through seven-character schemes.
  • Expands valid and invalid scheme test cases.
  • Removes the obsolete scheme-table generator.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/protocol.c Implements length-specific scheme lookup.
tests/unit/unit1627.c Expands scheme tests and supports benchmarking iterations.
tests/data/test1627 Updates expected invocation count.
scripts/schemetable.c Removes the obsolete generator.
scripts/Makefile.am Removes the generator from distribution files.
.github/scripts/typos.toml Excludes generated-like test strings from typo checks.
.github/scripts/codespell.sh Excludes generated-like test strings from codespell.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/unit/unit1627.c

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@bagder bagder closed this in 2687751 Aug 24, 2026
@bagder
bagder deleted the bagder/faster-scheme branch August 24, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration performance tests URL

Development

Successfully merging this pull request may close these issues.

2 participants