Commit ab22cb7
committed
Use a standard HashMap instead of one based on SHA1
It's faster throughout the board.
```
❯ cargo bench -p gix-object@0.44.0 --bench edit-tree
Compiling gix-object v0.44.0 (/Users/byron/dev/github.com/Byron/gitoxide/gix-object)
Compiling gix-pack v0.53.0 (/Users/byron/dev/github.com/Byron/gitoxide/gix-pack)
Compiling gix-odb v0.63.0 (/Users/byron/dev/github.com/Byron/gitoxide/gix-odb)
Finished `bench` profile [optimized] target(s) in 5.97s
Running benches/edit_tree.rs (target/release/deps/edit_tree-6af6651a1c453a05)
Gnuplot not found, using plotters backend
editor/small tree (empty -> full -> empty)
time: [2.5972 µs 2.6019 µs 2.6075 µs]
thrpt: [3.8351 Melem/s 3.8434 Melem/s 3.8503 Melem/s]
change:
time: [-32.618% -32.355% -32.038%] (p = 0.00 < 0.05)
thrpt: [+47.142% +47.831% +48.409%]
Performance has improved.
Found 14 outliers among 100 measurements (14.00%)
13 (13.00%) high mild
1 (1.00%) high severe
editor/deeply nested tree (empty -> full -> empty)
time: [8.2019 µs 8.2079 µs 8.2145 µs]
thrpt: [5.5998 Melem/s 5.6043 Melem/s 5.6084 Melem/s]
change:
time: [-33.517% -33.377% -33.246%] (p = 0.00 < 0.05)
thrpt: [+49.804% +50.099% +50.415%]
Performance has improved.
Found 13 outliers among 100 measurements (13.00%)
8 (8.00%) high mild
5 (5.00%) high severe
cursor/small tree (empty -> full -> empty)
time: [2.6911 µs 2.6935 µs 2.6961 µs]
thrpt: [3.7090 Melem/s 3.7127 Melem/s 3.7160 Melem/s]
change:
time: [-33.881% -33.546% -33.225%] (p = 0.00 < 0.05)
thrpt: [+49.757% +50.480% +51.242%]
Performance has improved.
Found 14 outliers among 100 measurements (14.00%)
4 (4.00%) high mild
10 (10.00%) high severe
cursor/deeply nested tree (empty -> full -> empty)
time: [1.3616 µs 1.3631 µs 1.3649 µs]
thrpt: [33.703 Melem/s 33.747 Melem/s 33.783 Melem/s]
change:
time: [-40.063% -39.675% -39.234%] (p = 0.00 < 0.05)
thrpt: [+64.566% +65.769% +66.843%]
Performance has improved.
Found 20 outliers among 100 measurements (20.00%)
18 (18.00%) high mild
2 (2.00%) high severe
```1 parent 0d9868c commit ab22cb7
2 files changed
+13
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | | - | |
| 300 | + | |
| 301 | + | |
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
424 | | - | |
| 423 | + | |
| 424 | + | |
425 | 425 | | |
426 | 426 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
| 427 | + | |
| 428 | + | |
431 | 429 | | |
432 | 430 | | |
433 | 431 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 21 | | |
29 | 22 | | |
30 | 23 | | |
| |||
35 | 28 | | |
36 | 29 | | |
37 | 30 | | |
38 | | - | |
| 31 | + | |
39 | 32 | | |
40 | 33 | | |
41 | 34 | | |
| |||
0 commit comments