Commit f80ee5d
committed
perf(sdk): use ahash for ValueMap HashMaps in metrics hot path
Replace the default SipHash-1-3 hasher with ahash (AES-NI backed) for
the HashMap used in ValueMap::trackers. SipHash's HashDoS resistance is
unnecessary here since ValueMap is pub(crate) and keys are not
attacker-controlled. ahash leverages hardware AES instructions for
significantly faster hashing of Vec<KeyValue> keys.
Refs: #3371
Co-Authored-By: Bryant Biggs <bryantbiggs@gmail.com>1 parent dba1820 commit f80ee5d
2 files changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
0 commit comments