This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Commit 25de947
committed
Add a fast path for string inputs
```
│ master.bench │ perf-string.bench │
│ sec/op │ sec/op vs base │
String/default-10 86.98n ± 3% 77.57n ± 1% -10.82% (p=0.002 n=6)
String/xxhash-10 40.10n ± 0% 34.82n ± 4% -13.19% (p=0.002 n=6)
geomean 59.06n 51.97n -12.01%
│ master.bench │ perf-string.bench │
│ B/op │ B/op vs base │
String/default-10 56.00 ± 0% 56.00 ± 0% ~ (p=1.000 n=6) ¹
String/xxhash-10 16.00 ± 0% 16.00 ± 0% ~ (p=1.000 n=6) ¹
geomean 29.93 29.93 +0.00%
¹ all samples are equal
│ master.bench │ perf-string.bench │
│ allocs/op │ allocs/op vs base │
String/default-10 3.000 ± 0% 3.000 ± 0% ~ (p=1.000 n=6) ¹
String/xxhash-10 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=6) ¹
geomean 1.732 1.732 +0.00%
```1 parent 72666c8 commit 25de947
1 file changed
+21
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
94 | 99 | | |
95 | 100 | | |
96 | 101 | | |
| |||
130 | 135 | | |
131 | 136 | | |
132 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
133 | 153 | | |
134 | 154 | | |
135 | 155 | | |
| |||
405 | 425 | | |
406 | 426 | | |
407 | 427 | | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
| 428 | + | |
416 | 429 | | |
417 | 430 | | |
418 | 431 | | |
| |||
0 commit comments