net: eliminate bounds checks in hasUpperCase#78311
net: eliminate bounds checks in hasUpperCase#78311jub0bs wants to merge 1 commit intogolang:masterfrom
Conversation
|
This PR (HEAD: 152ccbb) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/758600. Important tips:
|
152ccbb to
500d421
Compare
|
This PR (HEAD: 500d421) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/758600. Important tips:
|
|
Message from Ian Lance Taylor: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/758600. |
|
Message from jub0bs: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/758600. |
|
Message from jub0bs: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/758600. |
|
Message from Ian Lance Taylor: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/758600. |
Function hasUpperCase accesses its parameter's bytes while iterating over its runes. This approach muddles intent and causes an unnecessary bounds check. This CL makes hasUpperCase iterate over its parameter's bytes instead. Updates golang#76354
500d421 to
c0f1ab3
Compare
|
This PR (HEAD: c0f1ab3) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/758600. Important tips:
|
|
Message from jub0bs: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/758600. |
|
Message from Olivier Mengué: Patch Set 3: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/758600. |
Function hasUpperCase accesses its parameter's bytes while iterating
over its runes. This approach muddles intent and causes an unnecessary
bounds check.
This CL makes hasUpperCase iterate over its parameter's bytes instead.
Updates #76354