Skip to content

test: add benchmark suite for New/Test/Exec#3

Merged
dunglas merged 1 commit into
mainfrom
test/benchmarks
Apr 20, 2026
Merged

test: add benchmark suite for New/Test/Exec#3
dunglas merged 1 commit into
mainfrom
test/benchmarks

Conversation

@dunglas
Copy link
Copy Markdown
Owner

@dunglas dunglas commented Apr 20, 2026

Summary

  • Add BenchmarkNew, BenchmarkTest, BenchmarkExec covering simple, wildcard, named, regex and full patterns.
  • No production code changes — this gives us a baseline so later perf PRs can quote numbers.

Copilot AI review requested due to automatic review settings April 20, 2026 11:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a Go benchmark suite to establish performance/alloc baselines for core URLPattern operations (New, Test, Exec) across a small set of representative patterns. This supports later performance work by providing comparable benchmark numbers without changing production code.

Changes:

  • Introduce BenchmarkNew subbenchmarks for constructing patterns (simple/wildcard/named/regex/full).
  • Introduce BenchmarkTest and BenchmarkExec subbenchmarks for matching vs non-matching inputs.
  • Enable allocation reporting for all benchmarks via b.ReportAllocs().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread benchmark_test.go
Comment thread benchmark_test.go
Covers New(), Test(), and Exec() across simple, wildcard, named,
regex, and full URL patterns to enable future performance comparisons.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

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 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dunglas dunglas merged commit 92fee3d into main Apr 20, 2026
8 checks passed
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