strings: declare IndexByte as noescape
This lets []byte->string conversions which are used as arguments to strings.IndexByte and friends have their backing store allocated on the stack. It only prevents allocation when the string is small enough (32 bytes), so it isn't perfect. But reusing the []byte backing store directly requires a bunch more compiler analysis (see #2205 and related issues). Fixes #25864. Change-Id: Ie52430422196e3c91e5529d6e56a8435ced1fc4c Reviewed-on: https://go-review.googlesource.com/c/146018Reviewed-by:Brad Fitzpatrick <bradfitz@golang.org>
Showing
Please
register
or
sign in
to comment