-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aws/signer/v4: Optimize stripExcessSpaces
Optimizes stripExcessSpaces by using a hand rolled trim space avoiding the overhead of strings.TrimSpace and ensuring we only do a single pass on the string for both search and copy when stripping multiple spaces. This improves the performance on the test machine from 2378 ns/op to 1528 ns/op while keeping allocs the same.
- Loading branch information
Showing
2 changed files
with
32 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters