-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch from map[uint8] to map[int] because it is faster in go
go has some special speedups of maps for certain int sizes: -- results as of go 1.13 on my slow laptop -- BenchmarkInt 293182935 4.04 ns/op BenchmarkInt8 68107761 17.90 ns/op BenchmarkInt16 65628482 18.30 ns/op BenchmarkInt32 292725417 4.08 ns/op BenchmarkInt64 293602374 4.11 ns/op BenchmarkUInt8 68173198 17.80 ns/op BenchmarkUInt16 67566312 18.10 ns/op BenchmarkUInt32 298597942 3.99 ns/op BenchmarkUInt64 300239860 4.02 ns/op So switch to uint32 (vs 64 to save a bit of space maybe)
- Loading branch information
Showing
1 changed file
with
32 additions
and
12 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