-
Notifications
You must be signed in to change notification settings - Fork 366
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
remove unnecessary for loop in token signing string for readability #34
Conversation
- add testcase - add benchmark - improve performance slightly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Indeed improves readability a little bit. I wonder if there was any trick to the initial implementation that I am not seeing at first glance here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, needs an update from main and the requested change to make the benchmark to be more precise and report the allocations, otherwise I think we're fine (also see https://github.com/golang-jwt/jwt/pull/34/files#r680371882)
I was still cautions to touch functions that are the very core of this library, but it looks sound, doesn't add more allocations and is marginally faster, so I think you can merge it. |
…olang-jwt#34) * remove unnecessary for loop in token signing string for readability - add testcase - add benchmark - improve performance slightly * Fix benchtests on token_test.go * Update token_test.go to v4 Co-authored-by: hyeonjae <[email protected]> Co-authored-by: Luis Gabriel Gomez <[email protected]>
…olang-jwt#34) * remove unnecessary for loop in token signing string for readability - add testcase - add benchmark - improve performance slightly * Fix benchtests on token_test.go * Update token_test.go to v4 Co-authored-by: hyeonjae <[email protected]> Co-authored-by: Luis Gabriel Gomez <[email protected]>
remove unnecessary for-loop in token signing string for readability
and ...