Home

Awesome

apiary-benchmark

benchmark result of haskell lightweight web frameworks.

Frameworks

How to run

cabal update
cabal sandbox init
cabal get apiary-1.4.3 Spock-0.7.9.0 scotty-0.9.1 yesod-core-1.4.10 wai-routes-0.7.0
cabal install -fapiary -fSpock -fyesod-core -fscotty -fwai-routes --only-dependencies
./scripts/all.sh apiary-1.4.3 Spock-0.7.9.0 scotty-0.9.1 yesod-core-1.4.10 wai-routes-0.7.0

Benchmarks

  1. HELLO (no capture)
  2. PARAM (capture route parameter)
  3. DEEP (deep and many routes)
  4. AFTER_DEEP (after DEEP route)

Machines

tama

% uname -a
Linux tama 3.17.8-gentoo-r1 #28 SMP Sat Mar 21 20:13:44 JST 2015 x86_64 Intel(R) Core(TM) i3-2120T CPU @ 2.60GHz GenuineIntel GNU/Linux
% cat /proc/cpuinfo | grep 'model name'
model name	: Intel(R) Core(TM) i3-2120T CPU @ 2.60GHz
model name	: Intel(R) Core(TM) i3-2120T CPU @ 2.60GHz
model name	: Intel(R) Core(TM) i3-2120T CPU @ 2.60GHz
model name	: Intel(R) Core(TM) i3-2120T CPU @ 2.60GHz
% cat /proc/meminfo | grep MemTotal
MemTotal:       16354960 kB

Results

single thread

result

machineghcframeworkHELLOPARAMDEEPAFTER_DEEP
tama7.8.3apiary-1.4.334672.6727446.3532039.4036325.20
tama7.8.3wai-routes-0.7.037602.1522660.1131865.2539613.96
tama7.8.3Spock-0.7.9.028321.2323934.2126849.2329205.54
tama7.8.3yesod-core-1.4.1024462.3321083.6523688.0028186.62
tama7.8.3scotty-0.9.128552.4118326.252638.849818.50

References

  1. agrafix/Spock-scotty-benchmark