-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use string([]byte) as a cache key in decoder
Go has a special case for `string([]byte)` that doesn't allocate: * golang/go@f5f5a8b6209f8 Before and after: ``` BenchmarkCache/cached-10 132218238 9.292 ns/op 0 B/op 0 allocs/op BenchmarkCache/cached-10 212642139 5.694 ns/op 0 B/op 0 allocs/op ```
- Loading branch information
Showing
1 changed file
with
7 additions
and
18 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