Return the ID in a JSON response
Router Time / opLower is faster 100 ns 1 µs
Operations / secHigher is faster 1M 10M
Allocs / opLower uses less 0 15
Bytes / opLower uses less 0 B 1,500 B
httprouter Time / op236 ns Operations / sec4.24M Allocs / op4 Bytes / op80 B GoForj Web Time / op305.3 ns Operations / sec3.28M Allocs / op3 Bytes / op48 B Gin Time / op307.2 ns Operations / sec3.25M Allocs / op4 Bytes / op64 B Echo Time / op314.3 ns Operations / sec3.18M Allocs / op3 Bytes / op48 B net/http Time / op328.9 ns Operations / sec3.04M Allocs / op4 Bytes / op64 B Chi Time / op548.6 ns Operations / sec1.82M Allocs / op7 Bytes / op752 B Gorilla Mux Time / op762.4 ns Operations / sec1.31M Allocs / op11 Bytes / op1,200 B
The same in-process router workload, without a socket, network, or application business logic. Time and throughput use logarithmic axes (each interval is 10×). Allocations and bytes use linear axes from zero. Rates describe serial handler dispatch, not a concurrent HTTP load test. Time is the median of seven run averages; whiskers show run-to-run ranges, not request percentiles.
Snapshot 41f644d · Capture date not recorded · go1.27.2 · linux/arm64 · arm64 (CPU model unavailable) · GOMAXPROCS=1 · 7 runs × 1s
Return fixed text without middleware
Router Time / opLower is faster 10 ns 1 µs
Operations / secHigher is faster 1M 100M
Allocs / opLower uses less 0 8
Bytes / opLower uses less 0 B 900 B
httprouter Time / op65.13 ns Operations / sec15.35M Allocs / op1 Bytes / op16 B net/http Time / op125.4 ns Operations / sec7.98M Allocs / op1 Bytes / op16 B GoForj Web Time / op135.6 ns Operations / sec7.37M Allocs / op1 Bytes / op16 B Echo Time / op138 ns Operations / sec7.25M Allocs / op1 Bytes / op16 B Gin Time / op147.8 ns Operations / sec6.76M Allocs / op1 Bytes / op48 B Chi Time / op249.6 ns Operations / sec4.01M Allocs / op3 Bytes / op384 B Gorilla Mux Time / op468.7 ns Operations / sec2.13M Allocs / op8 Bytes / op864 B
The same in-process router workload, without a socket, network, or application business logic. Time and throughput use logarithmic axes (each interval is 10×). Allocations and bytes use linear axes from zero. Rates describe serial handler dispatch, not a concurrent HTTP load test. Time is the median of seven run averages; whiskers show run-to-run ranges, not request percentiles.
Snapshot 41f644d · Capture date not recorded · go1.27.2 · linux/arm64 · arm64 (CPU model unavailable) · GOMAXPROCS=1 · 7 runs × 1s
Set request state, add a header, validate the request
Router Time / opLower is faster 100 ns 1 µs
Operations / secHigher is faster 1M 10M
Allocs / opLower uses less 0 15
Bytes / opLower uses less 0 B 1,500 B
httprouter Time / op237.6 ns Operations / sec4.21M Allocs / op4 Bytes / op400 B Echo Time / op238.4 ns Operations / sec4.2M Allocs / op2 Bytes / op32 B net/http Time / op309 ns Operations / sec3.24M Allocs / op4 Bytes / op400 B Gin Time / op362.4 ns Operations / sec2.76M Allocs / op4 Bytes / op400 B GoForj Web Time / op369.7 ns Operations / sec2.71M Allocs / op3 Bytes / op48 B Chi Time / op421.1 ns Operations / sec2.37M Allocs / op6 Bytes / op768 B Gorilla Mux Time / op723.7 ns Operations / sec1.38M Allocs / op14 Bytes / op1,320 B
The same in-process router workload, without a socket, network, or application business logic. Time and throughput use logarithmic axes (each interval is 10×). Allocations and bytes use linear axes from zero. Rates describe serial handler dispatch, not a concurrent HTTP load test. Time is the median of seven run averages; whiskers show run-to-run ranges, not request percentiles.
Snapshot 41f644d · Capture date not recorded · go1.27.2 · linux/arm64 · arm64 (CPU model unavailable) · GOMAXPROCS=1 · 7 runs × 1s