yesodweb/benchmarks — comment on commit f45a4bb5d4f3a676bd439e9b76b431306b656e06
File:  line 0
By creationix:

Just a couple little things that would make this faster.

- It might help to use a buffer instead of a string, but make sure to pre-allocate it outside the loop. So `var body = new Buffer("PONG")`
- node supports keepalive, but I believe it only works if you set a content length. So add `'Content-Length': body.length` and run ab with the -k flag

Also regarding multi-core. Yes node is single-threaded javascript, but it's pretty easy to set up a server where a master process binds to port 3000 and then spawns a child-process per core who actually handle the work. The FD is passed to them at creation and so they all select over the same fd which is a very efficient load balancer. In my tests this yields almost linear improvements with the number of cores.

Add all of these and you'll be right up there with the best.