Should only matter on ppc64 and ppc64le.
Fixes #11336
Change-Id: Id4b0ac28b573648e1aa98e87bf010f00d006b146
Reviewed-on: https://go-review.googlesource.com/13901
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
if len(s2) < l {
l = len(s2)
}
+ if l == 0 || &s1[0] == &s2[0] {
+ goto samebytes
+ }
for i := 0; i < l; i++ {
c1, c2 := s1[i], s2[i]
if c1 < c2 {
return +1
}
}
+samebytes:
if len(s1) < len(s2) {
return -1
}