4 ms·
>What's being tested is the presence of pipelining :D Which is silly considering a majority of wild browsers now support HTTP/2. Thanks for pointing our the
by voidlogic 10y ago
>What's being tested is the presence of pipelining :D
Which is silly considering a majority of wild browsers now support HTTP/2.
Thanks for pointing our the repo, I missed it before: https://github.com/squeaky-pl/japronto https://github.com/squeaky-pl/japronto
His Go isn't horrible, but it could be written like this:
func hello(respWtr http.ResponseWriter, req *http.Request) {
text, status := []byte("Hello world!"), http.StatusOK
if request.URL.Path != "/" {
text, status = []byte("Not Found"), http.StatusNotFound
}
respWtr.WriteHeader(status)
response.Write(text)
}
Rather than: https://github.com/squeaky-pl/japronto/blob/master/benchmarks/golang/micro.go https://github.com/squeaky-pl/japronto/blob/master/benchmark...
Also, limiting Go to use a single core is unfair because the Go GC is optimized for multi-core operation.