BENCHMARK HTTP LIBS GO
Benchmark test with most popular libs in Go. Test implements a GET method wrapper to delivery a common interface.
Ps.: You can enjoy to use the HTTP dependency inversion for your clean Architecture project.
Libs selected:
- Fiber;
- FastHTTP (using fastHTTP routing, cause the package doesn’t have it);
- Gin;
- Echo;
- Mux;
Go Version:
- go version go1.18 darwin/amd64
Setup
- CPU: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
- OS: Macos Monterey 12.3.1
- RAM: 16 GB 2667 MHz DDR4
RESULTS
Ps.: All the benchmarks it was executed apart
Lib | Qty Operations | Average time per operation | Average memory per operation |
---|---|---|---|
Fiber | 2379 | 468,03 ms/op | 16,42 KB/op |
FastHTTP routing | 2379 | 489,90 ms/op | 16,45 KB/op |
Gin | 2730 | 429,50 ms/op | 17,04 KB/op |
Echo | 2720 | 447,75 ms/op | 17,02 KB/op |
Mux | 2730 | 539,45 ms/op | 17,16 KB/op |