Commit a2a3577
committed
feat(file_reader): swap
Significantly improves `file_reader` performance, especially when used
with `libc++`, where `std::deque` causes a significant regression due
to its larger block size.
```
Summary
libc++/dwarfsck.fifo8 -i perl-install-small-v0.7.5.dwarfs --checksum sha256 ran
1.00 ± 0.03 times faster than libstdc++/dwarfsck.fifo16 -i perl-install-small-v0.7.5.dwarfs --checksum sha256
1.00 ± 0.03 times faster than libc++/dwarfsck.fifo4 -i perl-install-small-v0.7.5.dwarfs --checksum sha256
1.01 ± 0.04 times faster than libstdc++/dwarfsck.deque -i perl-install-small-v0.7.5.dwarfs --checksum sha256
1.02 ± 0.03 times faster than libc++/dwarfsck.fifo16 -i perl-install-small-v0.7.5.dwarfs --checksum sha256
1.03 ± 0.04 times faster than libc++/dwarfsck.fifo32 -i perl-install-small-v0.7.5.dwarfs --checksum sha256
1.31 ± 0.04 times faster than libc++/dwarfsck.deque -i perl-install-small-v0.7.5.dwarfs --checksum sha256
```std::deque for small_fifo
1 parent 9a30e5e commit a2a3577
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
113 | 116 | | |
114 | 117 | | |
115 | | - | |
116 | | - | |
| 118 | + | |
| 119 | + | |
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
| |||
0 commit comments