diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2021-07-05 22:13:33 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <brad@danga.com> | 2021-07-07 11:30:49 -0700 |
| commit | 6dc38ff25c3d8b23a49f99199a27728b06133f2d (patch) | |
| tree | cead07f8c8f725226501b8e48fb4ce77948ccd38 /control/controlknobs | |
| parent | 396274445068c51311d2d4f2aaf6b04fe874e649 (diff) | |
| download | tailscale-6dc38ff25c3d8b23a49f99199a27728b06133f2d.tar.xz tailscale-6dc38ff25c3d8b23a49f99199a27728b06133f2d.zip | |
util/deephash: optimize hashing of byte arrays, reduce allocs in Hash
name old time/op new time/op delta
Hash-6 173µs ± 4% 101µs ± 3% -41.69% (p=0.000 n=10+9)
HashMapAcyclic-6 101µs ± 5% 105µs ± 3% +3.52% (p=0.001 n=9+10)
TailcfgNode-6 29.4µs ± 2% 16.4µs ± 3% -44.25% (p=0.000 n=8+10)
name old alloc/op new alloc/op delta
Hash-6 3.60kB ± 0% 1.13kB ± 0% -68.70% (p=0.000 n=10+10)
HashMapAcyclic-6 2.53kB ± 0% 2.53kB ± 0% ~ (p=0.137 n=10+8)
TailcfgNode-6 528B ± 0% 0B -100.00% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
Hash-6 84.0 ± 0% 40.0 ± 0% -52.38% (p=0.000 n=10+10)
HashMapAcyclic-6 202 ± 0% 202 ± 0% ~ (all equal)
TailcfgNode-6 11.0 ± 0% 0.0 -100.00% (p=0.000 n=10+10)
Updates tailscale/corp#2130
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Diffstat (limited to 'control/controlknobs')
0 files changed, 0 insertions, 0 deletions
