$ GOMAXPROCS=1 go test -bench=NetHTTPServerGet -benchmemPASSBenchmarkNetHTTPServerGet1ReqPerConn 100000 21211 ns/op 2407 B/op 30 allocs/opBenchmarkNetHTTPServerGet2ReqPerConn 100000 15682 ns/op 2373 B/op 24 allocs/opBenchmarkNetHTTPServerGet10ReqPerConn 200000 9957 ns/op 2103 B/op 19 allocs/opBenchmarkNetHTTPServerGet10000ReqPerConn 200000 8243 ns/op 2034 B/op 18 allocs/opBenchmarkNetHTTPServerGet1ReqPerConn1KClients 50000 23474 ns/op 2704 B/op 30 allocs/opBenchmarkNetHTTPServerGet2ReqPerConn1KClients 100000 18124 ns/op 2539 B/op 24 allocs/opBenchmarkNetHTTPServerGet10ReqPerConn1KClients 100000 11815 ns/op 2689 B/op 19 allocs/opBenchmarkNetHTTPServerGet10KReqPerConn1KClients 200000 9106 ns/op 2034 B/op 18 allocs/op
$ GOMAXPROCS=1 go test -bench=kServerGet -benchmemPASSBenchmarkServerGet1ReqPerConn 500000 2495 ns/op 0 B/op 0 allocs/opBenchmarkServerGet2ReqPerConn 1000000 1925 ns/op 0 B/op 0 allocs/opBenchmarkServerGet10ReqPerConn 1000000 1300 ns/op 0 B/op 0 allocs/opBenchmarkServerGet10KReqPerConn 1000000 1140 ns/op 0 B/op 0 allocs/opBenchmarkServerGet1ReqPerConn1KClients 500000 2460 ns/op 1 B/op 0 allocs/opBenchmarkServerGet2ReqPerConn1KClients 1000000 1962 ns/op 1 B/op 0 allocs/opBenchmarkServerGet10ReqPerConn1KClients 1000000 1340 ns/op 0 B/op 0 allocs/opBenchmarkServerGet10KReqPerConn1KClients 1000000 1180 ns/op 0 B/op 0 allocs/op
$ GOMAXPROCS=4 go test -bench=NetHTTPServerGet -benchmemPASSBenchmarkNetHTTPServerGet1ReqPerConn-4 200000 5929 ns/op 2434 B/op 30 allocs/opBenchmarkNetHTTPServerGet2ReqPerConn-4 300000 4153 ns/op 2399 B/op 24 allocs/opBenchmarkNetHTTPServerGet10ReqPerConn-4 500000 2751 ns/op 2118 B/op 19 allocs/opBenchmarkNetHTTPServerGet10000ReqPerConn-4 500000 2398 ns/op 2037 B/op 18 allocs/opBenchmarkNetHTTPServerGet1ReqPerConn1KClients-4 200000 5979 ns/op 2494 B/op 30 allocs/opBenchmarkNetHTTPServerGet2ReqPerConn1KClients-4 300000 4582 ns/op 2457 B/op 24 allocs/opBenchmarkNetHTTPServerGet10ReqPerConn1KClients-4 300000 3589 ns/op 2537 B/op 19 allocs/opBenchmarkNetHTTPServerGet10KReqPerConn1KClients-4 500000 2465 ns/op 2036 B/op 18 allocs/op
$ GOMAXPROCS=4 go test -bench=kServerGet -benchmemPASSBenchmarkServerGet1ReqPerConn-4 2000000 1094 ns/op 0 B/op 0 allocs/opBenchmarkServerGet2ReqPerConn-4 2000000 707 ns/op 0 B/op 0 allocs/opBenchmarkServerGet10ReqPerConn-4 3000000 417 ns/op 0 B/op 0 allocs/opBenchmarkServerGet10KReqPerConn-4 5000000 351 ns/op 0 B/op 0 allocs/opBenchmarkServerGet1ReqPerConn1KClients-4 2000000 916 ns/op 0 B/op 0 allocs/opBenchmarkServerGet2ReqPerConn1KClients-4 2000000 655 ns/op 0 B/op 0 allocs/opBenchmarkServerGet10ReqPerConn1KClients-4 3000000 404 ns/op 0 B/op 0 allocs/opBenchmarkServerGet10KReqPerConn1KClients-4 5000000 359 ns/op 0 B/op 0 allocs/op
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Looks really cool, thanks! Perhaps you should write an article about writing optimized go code :), your gorpc looks interesting too.
Maybe you could improve the standard library's net/http package with you knowledge?
Hi!Very nice package!Maybe a documentation section on "Switching from net.http" would help adopters.
It seems to be a drop-in replacement for http, which is very nice, but there isn't any information on what (if anything) to be aware of when switching.
Looking at the docs, it's a little overwhelming:But starting with the first method,Why is that exported to users? And why don't you just use the language feature which is built in and faster? (http://play.golang.org/p/oVFHGxcArD)
Dear Aliaksandr Valialkin,Any update on this?
Can you also, please, comment this post: https://www.reddit.com/r/golang/comments/3ty5uy/fast_http_package_for_go/cxaaz2u
Looks amazing! The annoying this is that I won't be able to help myself but switch over to using this, which puts me another day behind schedule :)Could you please add graceful restart as per: https://github.com/facebookgo/grace/blob/master/gracehttp/http.go ?
Maybe a documentation section on "Switching from net.http" would help adopters.
> *> Also when I see it right you don't support comma splitted header
> values. Also header must support \t(HT) or SP not only SP. That's
> only to name abit from Http RFC ... It is huge.*
>
> Show me such a crazy http client, which uses this RFC garbage and
> fasthttp will support this soon :)
The same approach to RFCs brought us Internet Explorer 6 through 10 (or
something).