Commit graph

2 commits

Author SHA1 Message Date
Marten Seemann
656f3d2d7d
remove the wire.ShortHeader in favor of more return values (#3535) 2022-08-30 04:37:36 -07:00
Marten Seemann
3a12a898a5 add a wire.ShortHeader, implement short header parsing
The new parsing function is vastly faster than the combination of header
and extended header parsing:

BenchmarkShortHeaderParsing-10          44192314                26.79 ns/op           48 B/op          1 allocs/op
BenchmarkShortHeaderParsingOld-10       12627363                99.99 ns/op          228 B/op          3 allocs/op
2022-08-29 15:06:34 +03:00