-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yktoken: remove encoding.binary's Read()/Write()
Using reflection is slow and we know what's inside a token. Just call the read and write bits we need. In my benchmarking, this moves from ~2000ns/op to about 40ns/op. This patch ends up touching more code because by removing error the Read() and Write() calls, a number of routines no longer have error codes to return and so this patch recursively removes those up the stack as well.
- Loading branch information
Showing
3 changed files
with
49 additions
and
52 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