which_is_the_fastest

Version, currently master branch1 version
  • master branchlatestApr 8, 2019

github.com/iris-contrib/third-party-benchmarks

Various frameworks benchmarks made by third-parties

38 stars
0 dependents
License: NOASSERTION

Installation

# Add this to your shard.yml
dependencies:
  which_is_the_fastest:
    github: iris-contrib/third-party-benchmarks
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
no constraint declared
Authors
Taichiro Suzuki, OvermindDL1, Marwan Rabbâa
Targets
  • neph from lib/neph/src/bin/neph_bin.cr
  • client from tools/src/client.cr
  • benchmarker from tools/src/benchmarker.cr

Dependencies

Runtime Dependencies

  • kiwi0.1.0github: crystal-community/kiwi
  • neph0.2.10github: tbrand/neph

README

Which is the fastest?

This project aims to be a load benchmarking suite, no more, no less

Measuring response times (routing times) for each framework (middleware).

Additional purposes :

  • Helping decide between languages, depending on use case
  • Learning languages, best practices, devOPS culture ...
  • Having fun :heart:

Requirements

  • Crystal as built-in tools are made in this language
  • Docker as frameworks are isolated into containers
  • wrk as benchmarking tool, >= 4.1.0

:information_source: you need wrk stable

git clone --branch 4.1.0 https://github.com/wg/wrk

:warning: docker is used for development purpose, production results will be computed on DigitalOcean :warning:

Usage

  • Install all dependencies
shards install
  • Build internal tools
shards build
  • Build containers

jobs are either languages (example : crystal) or frameworks (example : router.cr)

bin/neph [job1] [job2] [job3] ...
  • Start the benchmark ....

tools is a list of language / framework to challenge (example : ruby kemal amber go python)

bin/benchmarker [tools]

Results

Last update: 2019 March 01

OS: Linux (version: 4.16.3-301.fc28.x86_64, arch: x86_64)
CPU Cores: 8

Latency

Ranking (top 5)

:one: nickel (rust)

:two: roda (ruby)

:three: rack-routing (ruby)

:four: slim (php)

:five: laravel (php)

Full table

Language (Runtime)Framework (Middleware)Average50th percentile90th percentile99th percentile99.9th percentileStandard deviation
rust (1.32)nickel (0.11)0.08 ms0.09 ms0.12 ms0.16 ms5.88 ms57.33
ruby (2.6)roda (3.17)3.63 ms0.19 ms13.57 ms35.98 ms95.17 ms7781.67
ruby (2.6)rack-routing (0.0)4.56 ms0.24 ms17.34 ms41.14 ms101.54 ms9268.33
php (7.3)slim (3.12)155.57 ms0.37 ms260.18 ms3492.86 ms6708.36 ms578721.33
php (7.3)laravel (5.8)125.50 ms0.37 ms297.81 ms2405.81 ms6901.47 ms458184.67
ruby (2.6)flame (4.18)6.96 ms0.40 ms24.27 ms53.37 ms133.02 ms12338.00
rust (1.32)iron (0.6)0.40 ms0.40 ms0.62 ms0.96 ms12.30 ms224.33
ruby (2.6)hanami (1.3)7.43 ms0.42 ms26.23 ms53.66 ms130.79 ms12893.33
ruby (2.6)sinatra (2.0)8.87 ms0.55 ms28.98 ms58.68 ms132.30 ms14053.67
rust (nightly)rocket (0.4)114.21 ms1.76 ms4.29 ms3738.32 ms6593.28 ms622620.00
php (7.3)zend-framework (3.1)147.42 ms1.93 ms286.76 ms2935.34 ms6375.14 ms539996.00
php (7.3)lumen (5.7)146.90 ms2.25 ms278.24 ms3269.41 ms6774.79 ms533011.67
php (7.3)symfony (4.2)97.29 ms2.44 ms204.93 ms2171.42 ms5729.07 ms401643.33
php (7.3)zend-expressive (3.2)110.12 ms2.46 ms229.31 ms2463.01 ms5013.13 ms413493.00
rust (1.32)actix-web (0.7)3.69 ms2.79 ms7.99 ms16.77 ms36.59 ms3491.67
python (3.7)japronto (0.1)3.61 ms2.89 ms7.12 ms15.43 ms35.06 ms3235.67
ruby (2.6)rails (5.2)39.21 ms2.95 ms131.87 ms368.77 ms1075.92 ms78130.67
c (99)kore (3.1)6.47 ms3.23 ms7.87 ms45.88 ms722.37 ms29991.00
python (3.6)vibora (0.0)4.64 ms3.67 ms9.38 ms17.50 ms49.15 ms3772.33
c (11)agoo-c (0.3)3.84 ms3.91 ms6.43 ms8.57 ms33.94 ms2043.67
go (1.11)fasthttprouter (0.1)4.34 ms3.98 ms6.75 ms14.13 ms62.49 ms2659.00
crystal (0.27)onyx (0.6)4.38 ms4.16 ms7.44 ms14.19 ms33.37 ms2751.33
cpp (11.0)evhtp (1.2)3.82 ms4.21 ms5.54 ms8.05 ms90.15 ms2275.33
rust (1.32)gotham (0.3)4.94 ms4.41 ms9.23 ms20.08 ms159.88 ms4853.67
ruby (2.6)agoo (2.8)6.36 ms4.49 ms10.91 ms50.51 ms121.06 ms8911.67
crystal (0.27)spider-gazelle (1.4)5.36 ms4.50 ms10.16 ms21.39 ms70.27 ms4376.33
nim (0.19)jester (0.4)5.24 ms5.21 ms7.96 ms14.17 ms38.54 ms2720.67
node (11.10)restana (2.9)6.62 ms5.22 ms9.99 ms20.35 ms257.44 ms7853.67
node (11.10)rayo (1.2)7.28 ms5.53 ms10.74 ms21.89 ms326.25 ms9857.67
node (11.10)polka (0.5)7.14 ms5.54 ms10.87 ms22.48 ms263.29 ms7923.67
java (8)act (1.8)6.50 ms5.73 ms10.68 ms21.32 ms193.64 ms5019.67
go (1.11)iris (11.1)7.29 ms5.73 ms11.59 ms23.87 ms304.14 ms8735.67
go (1.11)muxie (1.0)7.16 ms5.82 ms12.11 ms24.04 ms108.50 ms4489.67
go (1.11)chi (4.0)7.31 ms5.95 ms12.24 ms24.41 ms152.05 ms4522.33
csharp (7.3)aspnetcore (2.2)7.19 ms6.02 ms9.78 ms19.71 ms426.52 ms11793.00
go (1.11)kami (2.2)7.68 ms6.40 ms12.60 ms25.04 ms57.70 ms4384.00
go (1.11)gin (1.3)7.94 ms6.48 ms13.45 ms26.16 ms141.34 ms5134.33
go (1.11)beego (1.11)8.03 ms6.55 ms13.37 ms27.02 ms219.42 ms5868.33
go (1.11)echo (4.0)8.24 ms6.58 ms13.80 ms28.21 ms187.67 ms7105.67
go (1.11)gorilla-mux (1.7)8.50 ms6.91 ms14.17 ms28.28 ms236.03 ms7776.33
scala (2.12)akkahttp (10.1)193.65 ms7.70 ms62.78 ms4676.68 ms7923.04 ms810306.33
node (11.10)foxify (0.10)8.87 ms8.08 ms13.98 ms26.16 ms313.02 ms9906.33
python (3.7)falcon (1.4)10.29 ms8.34 ms18.85 ms38.58 ms411.23 ms12645.33
node (11.10)fastify (2.0)12.41 ms8.61 ms15.93 ms88.41 ms604.14 ms27218.67
node (11.10)koa (2.7)10.04 ms8.71 ms14.79 ms34.04 ms422.32 ms13842.67
node (11.10)muneem (2.4)12.90 ms8.91 ms18.79 ms87.45 ms640.40 ms28081.67
python (3.7)bottle (0.12)11.61 ms9.19 ms21.77 ms43.71 ms287.87 ms9921.00
node (11.10)express (4.16)12.67 ms9.73 ms18.12 ms52.89 ms541.11 ms20771.00
go (1.11)gf (1.5)11.06 ms9.84 ms16.46 ms34.38 ms314.19 ms8879.00
node (11.10)restify (8.0)11.74 ms9.93 ms16.15 ms38.02 ms327.76 ms10875.33
python (3.7)hug (2.4)16.73 ms11.82 ms36.41 ms64.99 ms220.72 ms13722.00
python (3.7)starlette (0.11)14.46 ms12.47 ms24.83 ms41.30 ms107.54 ms7782.33
swift (4.2)perfect (3.0)12.74 ms12.95 ms14.79 ms17.19 ms44.86 ms1990.33
swift (4.2)vapor (3.2)22.21 ms13.43 ms24.34 ms298.12 ms1397.30 ms70670.67
scala (2.12)http4s (0.18)16.33 ms13.72 ms27.61 ms49.81 ms879.32 ms26285.00
python (3.7)bocadillo (0.12)19.03 ms17.70 ms30.86 ms45.51 ms98.65 ms8889.00
python (3.7)fastapi (0.6)21.80 ms18.78 ms37.17 ms54.81 ms104.09 ms11018.33
python (3.7)aiohttp (3.5)25.50 ms21.14 ms48.87 ms68.11 ms97.62 ms15221.33
node (11.10)hapi (18.1)33.94 ms23.19 ms38.71 ms368.08 ms1256.70 ms72155.00
swift (4.2)kitura (2.5)32.27 ms24.71 ms43.82 ms181.84 ms1078.48 ms51833.33
crystal (0.27)router.cr (0.2)27.83 ms24.98 ms38.72 ms49.04 ms240.45 ms9221.33
python (3.7)molten (0.7)35.13 ms25.52 ms70.65 ms99.27 ms271.21 ms23309.00
crystal (0.27)raze (0.3)28.52 ms26.01 ms37.52 ms48.02 ms394.14 ms12327.00
python (3.7)flask (1.0)38.06 ms29.86 ms52.21 ms261.73 ms585.71 ms40266.67
crystal (0.27)lucky (0.11)33.97 ms30.76 ms49.03 ms66.34 ms396.86 ms15802.00
crystal (0.27)kemal (0.25)32.24 ms32.88 ms42.63 ms50.33 ms210.63 ms10312.67
crystal (0.27)orion (1.6)41.11 ms34.18 ms51.54 ms178.62 ms575.66 ms36108.00
crystal (0.27)amber (0.11)35.61 ms34.23 ms48.10 ms58.16 ms481.05 ms18108.67
python (3.7)sanic (18.12)50.09 ms42.33 ms94.77 ms174.86 ms336.31 ms35906.67
python (3.7)quart (0.8)57.95 ms52.37 ms95.58 ms134.05 ms187.94 ms27375.67
python (3.7)django (2.1)59.04 ms56.85 ms70.96 ms126.64 ms718.70 ms29334.67
python (3.7)responder (1.3)77.97 ms70.06 ms132.80 ms174.52 ms287.66 ms37169.67
python (3.7)tornado (5.1)88.75 ms88.67 ms113.16 ms134.23 ms498.66 ms22226.33

Requests per seconds

Ranking (top 5)

:one: (japronto) (python)

:two: (actix-web) (rust)

:three: (agoo-c) (c)

:four: (kore) (c)

:five: (evhtp) (cpp)

Full table

Language (Runtime)Framework (Middleware)Requests / sThroughput
python (3.7)japronto (0.1)278765.00333.82 MB
rust (1.32)actix-web (0.7)277726.33315.84 MB
c (11)agoo-c (0.3)256969.00148.14 MB
c (99)kore (3.1)238152.33619.01 MB
cpp (11.0)evhtp (1.2)230709.67223.98 MB
python (3.6)vibora (0.0)230566.00261.83 MB
crystal (0.27)onyx (0.6)214658.33201.62 MB
go (1.11)fasthttprouter (0.1)212598.33341.88 MB
rust (1.32)gotham (0.3)206167.33422.02 MB
nim (0.19)jester (0.4)200078.33401.88 MB
java (8)act (1.8)199296.00389.38 MB
crystal (0.27)spider-gazelle (1.4)189826.00202.29 MB
ruby (2.6)agoo (2.8)185700.00107.29 MB
node (11.10)restana (2.9)151984.00227.23 MB
rust (1.32)iron (0.6)148058.00186.65 MB
node (11.10)rayo (1.2)140927.67211.03 MB
node (11.10)polka (0.5)140478.00210.35 MB
csharp (7.3)aspnetcore (2.2)139048.00226.56 MB
go (1.11)iris (11.1)138972.67186.35 MB
go (1.11)muxie (1.0)135826.33181.93 MB
go (1.11)chi (4.0)133324.67178.57 MB
go (1.11)kami (2.2)128629.00170.63 MB
go (1.11)gin (1.3)124206.33218.14 MB
go (1.11)beego (1.11)122935.67165.71 MB
go (1.11)echo (4.0)122391.67215.01 MB
go (1.11)gorilla-mux (1.7)117398.67157.07 MB
node (11.10)foxify (0.10)114828.33240.98 MB
node (11.10)fastify (2.0)113817.33278.23 MB
python (3.7)falcon (1.4)105946.33272.32 MB
node (11.10)koa (2.7)105725.00223.86 MB
node (11.10)muneem (2.4)104843.33157.01 MB
rust (1.32)nickel (0.11)93604.00186.24 MB
go (1.11)gf (1.5)91970.67139.41 MB
python (3.7)bottle (0.12)91445.00225.36 MB
node (11.10)express (4.16)88783.33217.48 MB
node (11.10)restify (8.0)88618.00155.58 MB
swift (4.2)perfect (3.0)78114.6773.48 MB
php (7.3)symfony (4.2)74838.00372.12 MB
python (3.7)starlette (0.11)69945.33150.82 MB
php (7.3)zend-expressive (3.2)69506.33345.69 MB
scala (2.12)akkahttp (10.1)69211.67148.52 MB
php (7.3)zend-framework (3.1)69201.00343.70 MB
scala (2.12)http4s (0.18)68209.00119.30 MB
python (3.7)hug (2.4)66776.67165.65 MB
php (7.3)slim (3.12)65902.67327.06 MB
swift (4.2)vapor (3.2)65864.67110.19 MB
php (7.3)lumen (5.7)63752.67331.39 MB
python (3.7)bocadillo (0.12)52601.67101.64 MB
php (7.3)laravel (5.8)49569.67258.32 MB
rust (nightly)rocket (0.4)49413.3378.45 MB
python (3.7)fastapi (0.6)46468.00100.49 MB
python (3.7)aiohttp (3.5)41930.0095.15 MB
node (11.10)hapi (18.1)40613.00105.26 MB
ruby (2.6)roda (3.17)35618.0034.00 MB
crystal (0.27)router.cr (0.2)35377.6733.19 MB
crystal (0.27)raze (0.3)35094.0032.89 MB
swift (4.2)kitura (2.5)34840.3364.63 MB
python (3.7)molten (0.7)32160.3359.85 MB
crystal (0.27)kemal (0.25)30858.3350.26 MB
python (3.7)flask (1.0)29244.3372.09 MB
crystal (0.27)lucky (0.11)29041.3335.68 MB
ruby (2.6)rack-routing (0.0)28182.3316.27 MB
crystal (0.27)amber (0.11)28061.0051.28 MB
crystal (0.27)orion (1.6)25648.0041.79 MB
python (3.7)sanic (18.12)21389.0038.12 MB
ruby (2.6)flame (4.18)18349.3310.61 MB
python (3.7)quart (0.8)17298.0034.44 MB
ruby (2.6)hanami (1.3)17171.33130.10 MB
python (3.7)django (2.1)16754.6748.56 MB
ruby (2.6)sinatra (2.0)14379.6737.36 MB
python (3.7)responder (1.3)12817.0027.94 MB
python (3.7)tornado (5.1)10993.3332.48 MB
ruby (2.6)rails (5.2)3269.6710.06 MB

How to contribute ?

In any way you want ...

  • Request a framework addition
  • Report a bug (on any implementation)
  • Suggest an idea
  • ...

Any kind of idea is :heart:

Contributors

This repository contains a clean copy of the-benchmarker/web-frameworks based on GIT COMMIT: 817e4e1bf96437ada09f0dfd699feb7e028b2817.