Implementation

Gin

Gin 1.12.0 · Go · Popular references · ranked

frameworks/gin on GitHub

Scores

Score relative to Axum (1.00×, higher is better) and position among the 14 ranked implementations; Stability: pass.
CategoryPositionScore±
Hello world3–70.48*±8.4%
Database1–21.12*±7.6%
Application30.94*±4.3%
Memory (high-water mark)1–51.00≈±0.4%
Startup1–131.00≈±0.0%

Runner CPUs: EPYC 9V74, EPYC 7763, EPYC 9V74

Settings

Runtime
Go 1.27.4 (CGO_ENABLED=0), GIN_MODE=release
Server
net/http via router.Run
Workers
One process; the Go scheduler runs goroutines on GOMAXPROCS threads, which defaults to the 2 available CPUs
Database layer
GORM 1.31 with gorm.io/driver/postgres 1.6 (pgx 5), one database/sql pool of DB_POOL_SIZE connections
Templates
html/template via router.LoadHTMLGlob
Logging
none (gin.New() without the Logger middleware, GORM logger silent)
Dependency source
–
Status
measured

Application endpoints: mechanisms

Validation
ShouldBindUri, ShouldBindQuery, ShouldBindJSON and ShouldBind with validator tags; the handlers answer 400
CSRF
fetch-metadata (stdlib): net/http.CrossOriginProtection (Check) as middleware of the /form, /login and /me group (Sec-Fetch-Site, then Origin against Host; 403)
Session store
cookie-signed (library): gin-contrib/sessions 1.1 cookie store (gorilla/sessions, HMAC-signed)

Tier 1 endpoints

Medians over every round (lowest and highest round in brackets); vs Axum: the median of the per-round ratios on the same runners.
Endpointreq/svs AxumEfficiency (req/CPU-s)p99 (ms)ErrorsLimits
/text89,495 (56,601–90,984)0.5345,6304.670
/json77,424 (48,118–78,569)0.4739,3965.160
/db-single23,493 (14,972–24,126)1.2815,09422.250PostgreSQL-bound 15/15
/html71,891 (44,561–74,611)0.4436,4605.640
/queries?queries=201,441 (1,040–1,476)1.32990130.260PostgreSQL-bound 15/15
/fortunes15,138 (9,574–15,659)0.547,66732.810
GET /world/{id}22,277 (14,512–22,627)1.2614,21823.550PostgreSQL-bound 15/15
GET /worlds15,113 (10,206–16,512)1.099,43034.790PostgreSQL-bound 15/15
POST /form47,593 (29,847–48,306)0.5724,2158.240
GET /me16,318 (10,465–17,261)1.708,35331.130
/updates?queries=20654 (470–667)1.38481284.960PostgreSQL-bound 15/15
PUT /world/{id}9,086 (6,159–9,266)0.646,11441.390PostgreSQL-bound 15/15

Measured versions

Runner jobs

Each job ran on its own GitHub-hosted runner; the CPU model differs between jobs.
JobCPU modelRoundsStatus
1EPYC 9V745measured
2EPYC 77635measured
3EPYC 9V745measured