This benchmark demonstrates the new-fibers improvements via Kemal.
# app.cr
require "kemal"
get "/" do
"Hello World"
end
To run the app
crystal build --release src/app.cr && ./app
wrk
is used to perform the benchmarks
wrk -c 100 -d 10 http://localhost:3000/
Crystal | Request Per Second | Avg. Response Time |
---|---|---|
new-fibers | 64322.55 | 1.55ms |
v0.10.0 | 53218.11 | 1.86ms |
Seems like new-fibers increases the rps throughput by around %10 - %20 :)