From db4d12738065d5c2f8e1e71a45eeaa843a37f335 Mon Sep 17 00:00:00 2001 From: Dustin Sallings Date: Thu, 11 Aug 2016 17:16:06 -0700 Subject: [PATCH] Slightly reduce allocations in Find --- bytes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bytes.go b/bytes.go index 3702037..0666a0f 100644 --- a/bytes.go +++ b/bytes.go @@ -98,7 +98,7 @@ func Find(data []byte, path string) ([]byte, error) { offset := 0 beganLiteral := 0 - current := []string{} + current := make([]string, 0, 32) for { if offset >= len(data) { break