Just a simple language benchmark with a naive implementation of Fibonacci served via HTTP.
fib :: Int -> Int
fib 0 = 0
fib 1 = 1
fib n = fib (n - 1) + fib (n - 2)
The most performant from each language
Language |
Framework |
Requests/sec |
Total requests |
Avg Latency |
Haskell |
Apiary |
69,056 |
2,076,808 |
2.33ms |
Go |
Gin |
55,943 |
1,679,347 |
1.17ms |
Java |
Spark |
47,061 |
1,412,082 |
1.38ms |
Elixir |
Sugar |
22,813 |
685,273 |
3.83ms |
Node.JS |
Express |
22,696 |
683,177 |
3.15ms |
Ruby |
Roda |
7,537 |
22,6137 |
2.12ms |
Language |
Framework |
Requests/sec |
Total requests |
Avg Latency |
Haskell |
Apiary |
69,056 |
2,076,808 |
2.33ms |
Haskell |
Spock |
57,416 |
1,724,062 |
2.57ms |
Haskell |
Simple |
56,104 |
1,684,709 |
2.70ms |
Go |
Gin |
55,943 |
1,679,347 |
1.17ms |
Haskell |
Scotty |
50,048 |
1,502,738 |
2.90ms |
Go |
Pat |
48,128 |
1,447,483 |
2.43ms |
Java |
Spark |
47,061 |
1,412,082 |
1.38ms |
Go |
Gorilla |
46,729 |
1,402,482 |
2.77ms |
Haskell |
Snap |
23,756 |
715,166 |
7.11ms |
Elixir |
Sugar |
22,813 |
685,273 |
3.83ms |
Node.JS |
Express |
22,696 |
683,177 |
3.15ms |
Java |
Jersey |
22,506 |
677,301 |
2.45ms |
Node.JS |
Restify |
21,296 |
641,021 |
3.27ms |
Elixir |
Phoenix |
18,624 |
559,225 |
5.90ms |
Haskell |
Happstack Lite |
7,888 |
237,474 |
8.11ms |
Ruby |
Roda |
7,537 |
22,6137 |
2.12ms |
Ruby |
Cuba |
5,246 |
15,7422 |
3.04ms |
Ruby |
NYNY |
3,671 |
11,0173 |
4.35ms |
Ruby |
Sinatra |
2,667 |
80,134 |
5.99ms |
Ruby |
Rails |
2,334 |
70,108 |
6.86ms |
Alphabetical order
Framework |
Requests/sec |
Total requests |
Avg Latency |
Sugar |
22,813 |
685,273 |
3.83ms |
Phoenix |
18,624 |
559,225 |
5.90ms |
Framework |
Requests/sec |
Total requests |
Avg Latency |
Gin |
55,943 |
1,679,347 |
1.17ms |
Pat |
48,128 |
1,447,483 |
2.43ms |
Gorilla |
46,729 |
1,402,482 |
2.77ms |
Framework |
Requests/sec |
Total requests |
Avg Latency |
Memory footprint |
Apiary |
69,056 |
2,076,808 |
2.33ms |
30MB |
Spock |
57,416 |
1,724,062 |
2.57ms |
28MB |
Simple |
56,104 |
1,684,709 |
2.70ms |
28MB |
Scotty |
50,048 |
1,502,738 |
2.90ms |
26MB |
Snap |
23,756 |
715,166 |
7.11ms |
33MB |
Happstack Lite |
7,888 |
237,474 |
8.11ms |
34MB |
Framework |
Requests/sec |
Total requests |
Avg Latency |
Spark |
47,061 |
1,412,082 |
1.38ms |
Jersey |
22,506 |
677,301 |
2.45ms |
Framework |
Requests/sec |
Total requests |
Avg Latency |
Express |
22,696 |
683,177 |
3.15ms |
Restify |
21,296 |
641,021 |
3.27ms |
Framework |
Requests/sec |
Total requests |
Avg Latency |
Roda |
7,537 |
22,6137 |
2.12ms |
Cuba |
5,246 |
15,7422 |
3.04ms |
NYNY |
3,671 |
11,0173 |
4.35ms |
Sinatra |
2,667 |
80,134 |
5.99ms |
Rails |
2,334 |
70,108 |
6.86ms |
The tests were run on a Retina Macbook Pro [email protected] and 8GB RAM using wrk:
$ wrk -c 64 -d 30s http://localhost:4000/10