-
Notifications
You must be signed in to change notification settings - Fork 18.1k
archive/tar: narrow trim range for formatter'formatString #60729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When dealing with the last special case, we only need to know the string length after TrimRight '/'. This optimization clarifies what we really want and speeds up the execution.
This PR (HEAD: 34a6028) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/502376 to see it. Tip: You can toggle comments from me using the |
Message from Ian Lance Taylor: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/502376. |
Message from Sense As: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/502376. |
Message from Ian Lance Taylor: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/502376. |
Message from Joseph Tsai: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/502376. |
Message from Sense As: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/502376. |
Message from Sense As: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/502376. |
Trim s[:len(b)-1] rather than s[:len(b)], since s[len(b)-1] is '/'.
This PR (HEAD: 4579775) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/502376 to see it. Tip: You can toggle comments from me using the |
Message from Ian Lance Taylor: Patch Set 2: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/502376. |
Message from Gopher Robot: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/502376. |
Message from Gopher Robot: Patch Set 2: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/502376. |
Message from Ian Lance Taylor: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/502376. |
Message from Sense As: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/502376. |
Message from Ian Lance Taylor: Patch Set 2: Auto-Submit+1 Code-Review+2 Run-TryBot+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/502376. |
Trim s[:len(b)-1] rather than s[:len(b)], since s[len(b)-1] is '/'. Change-Id: I055da555810c112774549bd13d4faa8bfa0a60dc GitHub-Last-Rev: 4579775 GitHub-Pull-Request: #60729 Reviewed-on: https://go-review.googlesource.com/c/go/+/502376 Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: David Chase <[email protected]>
This PR is being closed because golang.org/cl/502376 has been merged. |
Trim s[:len(b)-1] rather than s[:len(b)], since s[len(b)-1] is '/'.