• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dunglas / go-urlpattern / 29481117602

16 Jul 2026 07:47AM UTC coverage: 91.899% (+0.02%) from 91.878%
29481117602

push

github

web-flow
perf: share precompiled regexps for common component patterns (#12)

Compiling a URLPattern compiles one regexp per URL component. In typical
patterns most components are the full wildcard (the default for username,
password, search and hash) or empty (a common port), whose generated
expressions are a small fixed set of constant strings. Reuse a shared
precompiled *regexp.Regexp for those (safe for concurrent use) instead of
calling regexp.Compile per component.

New geomean: -21% time, -25% B/op, -22% allocs (BenchmarkNew).

1486 of 1617 relevant lines covered (91.9%)

1130.99 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

96.07
/constructor_type_parser.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc