aboutsummaryrefslogtreecommitdiff
path: root/bytesconv_timing_test.go
diff options
context:
space:
mode:
authorGravatar Aliaksandr Valialkin <valyala@gmail.com> 2017-07-21 16:08:18 +0300
committerGravatar Aliaksandr Valialkin <valyala@gmail.com> 2017-07-21 16:08:21 +0300
commitd257ae60a32c5605ac63b2f4f0f80a0dcffb0719 (patch)
tree57fb09fe77e486b193ad72ca6766ce37b13be433 /bytesconv_timing_test.go
parentIssue #278: more optimizations for normalizeHeaderKey (diff)
downloadfasthttp-d257ae60a32c5605ac63b2f4f0f80a0dcffb0719.tar.gz
fasthttp-d257ae60a32c5605ac63b2f4f0f80a0dcffb0719.tar.bz2
fasthttp-d257ae60a32c5605ac63b2f4f0f80a0dcffb0719.zip
ioptimized decodeArgAppend a bit
Benchmark results on linux/amd64: name old time/op new time/op delta ArgsParse-4 72.8ns ± 2% 68.0ns ± 2% -6.59% (p=0.000 n=10+9) AppendUnquotedArgFastPath-4 20.4ns ± 2% 21.1ns ± 9% ~ (p=0.614 n=8+10) AppendUnquotedArgSlowPath-4 68.9ns ± 3% 70.4ns ± 6% ~ (p=0.148 n=9+10) URIParsePath-4 80.9ns ± 2% 78.7ns ± 2% -2.80% (p=0.000 n=10+10) URIParsePathQueryString-4 88.9ns ± 1% 86.3ns ± 1% -2.90% (p=0.000 n=10+8) URIParsePathQueryStringHash-4 95.7ns ± 8% 91.0ns ± 1% -4.88% (p=0.000 n=9+10) URIParseHostname-4 98.6ns ± 1% 95.4ns ± 1% -3.24% (p=0.000 n=10+10)
Diffstat (limited to 'bytesconv_timing_test.go')
-rw-r--r--bytesconv_timing_test.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/bytesconv_timing_test.go b/bytesconv_timing_test.go
index 53f04ac..24b6a49 100644
--- a/bytesconv_timing_test.go
+++ b/bytesconv_timing_test.go
@@ -75,18 +75,6 @@ func BenchmarkInt2HexByte(b *testing.B) {
})
}
-func BenchmarkHexByte2Int(b *testing.B) {
- buf := []byte("0A1B2c3d4E5F6C7a8D9ab7cd03ef")
- b.RunParallel(func(pb *testing.PB) {
- var c byte
- for pb.Next() {
- for _, c = range buf {
- hexbyte2int(c)
- }
- }
- })
-}
-
func BenchmarkWriteHexInt(b *testing.B) {
b.RunParallel(func(pb *testing.PB) {
var w ByteBuffer