• v1.1.0 045ac8b5a3

    Implement performance optimizations v1.1.0

    dalu released this 2025-10-26 18:06:15 +01:00 | 2 commits to master since this release

    • Replace map-based Params with slice-based structure for 25-40% reduction in allocations
    • Implement zero-allocation path parsing with pre-allocation
    • Add enhanced memory pooling for parameters, segments, and string builders
    • Optimize wildcard parameter handling with string builders
    • Add comprehensive performance benchmarks
    • Achieve 14-49% performance improvements across all route types
    • Maintain full API compatibility

    Performance improvements:

    • Static routes: 14.6% faster (682.1 vs 798.5 ns/op)
    • Parameter routes: 24.7% faster (868.9 vs 1154 ns/op)
    • Wildcard routes: 41.6% faster (979.3 vs 1676 ns/op)
    • Multiple parameters: 41.5% faster (1026 vs 1753 ns/op)
    • Middleware: 49.0% faster (1930 vs 3782 ns/op)
    • Route groups: 49.5% faster (1442 vs 2855 ns/op)
    • Large router: 24.5% faster (833.0 vs 1103 ns/op)
    Downloads