ainilili / wildcat

A golang zero-allocation HTTP parser (and eventually http server)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wildcat

GoDoc

A high performance golang HTTP parser.

Baseline benchmarking results:

zero :: evanphx/wildcat> go test -bench . -benchmem
PASS
BenchmarkParseSimple	50000000	        44.4 ns/op	       0 B/op	       0 allocs/op
BenchmarkNetHTTP	  500000	      4608 ns/op	    4627 B/op	       7 allocs/op
BenchmarkParseSimpleHeaders	20000000	       106 ns/op	       0 B/op	       0 allocs/op
BenchmarkParseSimple3Headers	10000000	       213 ns/op	       0 B/op	       0 allocs/op
BenchmarkNetHTTP3	  500000	      6733 ns/op	    5064 B/op	      11 allocs/op
ok  	github.com/evanphx/wildcat	12.665s

NOTE: these are a bit of lie because wildcat doesn't yet do everything that net/http.ReadRequest does. The numbers are included here only to provide a baseline comparison for future work.

About

A golang zero-allocation HTTP parser (and eventually http server)

License:BSD 2-Clause "Simplified" License


Languages

Language:Go 100.0%