]> Cypherpunks repositories - gostls13.git/commit
strings: Add benchmark test for trim function
authorJohn Potocny <johnp@vividcortex.com>
Thu, 26 Mar 2015 01:08:04 +0000 (21:08 -0400)
committerIan Lance Taylor <iant@golang.org>
Tue, 31 Mar 2015 00:40:55 +0000 (00:40 +0000)
commit6262192cd0fb98d6bb80752de70ae33fc10dc33e
tree92abd988571dfdde55510c10864f28432d1d78b9
parentc45751e8a50d6050c6090d654364d69599b2e97a
strings: Add benchmark test for trim function

The strings.Trim function and variants allocate memory on the heap when creating a function to pass into TrimFunc.
Add a benchmark to document the behavior; an issue will be submitted to address this behavior in the compiler if possible.

Change-Id: I8b66721f077951f7e7b8cf3cf346fac27a9b68c0
Reviewed-on: https://go-review.googlesource.com/8200
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/strings/strings_test.go