- OS: Ubuntu 14.04 X64
- CPU: Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz
- RAM: 8GB
- go: go version go1.3 linux/amd64
- nodejs: v0.10.30
- HHVM: 3.1.0 and 3.2.0
package main
import (
"fmt"
"net/http"
)
func sayhelloName(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello World")
}
func main() {
http.HandleFunc("/", sayhelloName)
http.ListenAndServe(":8080", nil)
}
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World');
}).listen(8080, '127.0.0.1');
<?php
$server = new UVHttpServer('127.0.0.1', 8080);
$server->onDefaultRequest(function(UVHttpClient $client){
$client->sendReply('Hello World hhvm');
$client->setCloseOnBufferEmpty();
})
->start();
UVLoop::defaultLoop()->run();
go |
21175.09 |
nodejs |
6769.41 |
HHVM 3.1.0 |
20404.50 |
HHVM 3.2.0 |
20521.41 |
go |
16980.44 |
nodejs |
fail! Total of 9507 requests completed |
HHVM 3.1.0 |
15825.24 |
HHVM 3.2.0 |
16342.17 |
go |
16265.59 |
nodejs |
not test |
HHVM 3.1.0 |
15883.72 |
HHVM 3.2.0 |
15656.72 |