You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CL 20981 added bounds checking hints to encoding/binary, of the form
b = b[:8:len(b)]
It would be clearer and simpler and generate less code to use:
_ = b[7]
However, the compiler isn't yet able to use such a hint.
This issue is to teach the compiler to use such a hint and to update whatever sites it has already been used. At a minimum, this is encoding/binary, but #14884 suggests using it in the image package, and I wouldn't be surprised to find it popping up other places soon as well.
Marking tentatively as Go 1.7, because once this gets released, lots of folks will start adding bounds checking hints of one kind or another, and it'd be nice if they were of the shorter form.
The text was updated successfully, but these errors were encountered:
CL 20981 added bounds checking hints to encoding/binary, of the form
b = b[:8:len(b)]
It would be clearer and simpler and generate less code to use:
_ = b[7]
However, the compiler isn't yet able to use such a hint.
This issue is to teach the compiler to use such a hint and to update whatever sites it has already been used. At a minimum, this is encoding/binary, but #14884 suggests using it in the
image
package, and I wouldn't be surprised to find it popping up other places soon as well.For more background, see the discussion at https://groups.google.com/forum/#!topic/golang-dev/jVP6h21OyL8
Marking tentatively as Go 1.7, because once this gets released, lots of folks will start adding bounds checking hints of one kind or another, and it'd be nice if they were of the shorter form.
The text was updated successfully, but these errors were encountered: