On 25 September 2017 at 17:43, Amnon Baron Cohen wrote:
> https://github.com/golang/go/issues/2632
>
Nice link, fun to see that all this discussion has happened before (and no
doubt, will happen again!).
Reading that thread and related threads, I get the impression that there is
not an open iss
On 15 September 2017 at 11:54, roger peppe wrote:
> I suspect that this kind of performance issue may be fixed by better
> compiler optimisation in the future (I think should be possible for
> the compiler to notice that the string doesn't escape and pass a
> pointer to the byte slice as the stri
I suspect that this kind of performance issue may be fixed by better
compiler optimisation in the future (I think should be possible for
the compiler to notice that the string doesn't escape and pass a
pointer to the byte slice as the string argument).
On 15 September 2017 at 10:36, Peter Waller
Because of the immutability of the string, constructing a string on a byte
slice requires allocating and copying the bytes. Once you've got the
string, it's "free" to pass around.
If you've already got strings, everything is fine. But if you're reading
the data from IO, you're probably starting wi