summaryrefslogtreecommitdiffhomepage
path: root/control/controlknobs/controlknobs.go
diff options
context:
space:
mode:
authorJoe Tsai <joetsai@digital-static.net>2021-08-02 21:44:13 -0700
committerGitHub <noreply@github.com>2021-08-02 21:44:13 -0700
commitd8fbce7eefe6151fa9f09425c453ddc6e5c55bba (patch)
tree501fc6d78e70db2e1d48e8b3dc703adc6c91c798 /control/controlknobs/controlknobs.go
parent01d4dd331d6255bd8fe4b8e9e4197253ff59efe7 (diff)
downloadtailscale-d8fbce7eefe6151fa9f09425c453ddc6e5c55bba.tar.xz
tailscale-d8fbce7eefe6151fa9f09425c453ddc6e5c55bba.zip
util/deephash: hash uint{8,16,32,64} explicitly (#2502)
Instead of hashing the humanly formatted forms of a number, hash the native machine bits of the integers themselves. There is a small performance gain for this: name old time/op new time/op delta Hash-8 75.7µs ± 1% 76.0µs ± 2% ~ (p=0.315 n=10+9) HashMapAcyclic-8 63.1µs ± 3% 61.3µs ± 1% -2.77% (p=0.000 n=10+10) TailcfgNode-8 10.3µs ± 1% 10.2µs ± 1% -1.48% (p=0.000 n=10+10) HashArray-8 1.07µs ± 1% 1.05µs ± 1% -1.79% (p=0.000 n=10+10) Signed-off-by: Joe Tsai <joetsai@digital-static.net>
Diffstat (limited to 'control/controlknobs/controlknobs.go')
0 files changed, 0 insertions, 0 deletions