Skip to content

Instantly share code, notes, and snippets.

@mmaelzer
Last active November 5, 2015 17:23
Show Gist options
  • Save mmaelzer/d268f13d84ba86592064 to your computer and use it in GitHub Desktop.
Save mmaelzer/d268f13d84ba86592064 to your computer and use it in GitHub Desktop.
node.js vs go on deserlizing/serializing 1k json
~/code/http-bench
// go GOMAXPROCS=1 go run webserver.go
// go 1.5
❯ wrk -d10s -t10 -spost_json.lua http://127.0.0.1:8080
Running 10s test @ http://127.0.0.1:8080
10 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 2.35ms 8.83ms 141.01ms 98.36%
Req/Sec 737.67 232.61 6.24k 90.63%
73018 requests in 10.10s, 84.75MB read
Requests/sec: 7227.97
Transfer/sec: 8.39MB
~/code/http-bench 10s
// node webserver.js
// node v4.2.1
❯ wrk -d10s -t10 -spost_json.lua http://127.0.0.1:7070
Running 10s test @ http://127.0.0.1:7070
10 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.36ms 709.16us 21.22ms 87.31%
Req/Sec 754.88 195.42 2.52k 78.29%
75464 requests in 10.10s, 90.61MB read
Requests/sec: 7470.72
Transfer/sec: 8.97MB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment