Commit 1fc14d8
committed
wc: Align buffer to 32-byte boundary
bytecount uses vector operations to speed up line counting.
At least on x86 with AVX2 support, the vectors are 256-byte wide,
and operations are much faster if the data is aligned.
Saves about 4% of total performance, matching wc's performance.1 parent 1fe539f commit 1fc14d8
1 file changed
+19
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
200 | 217 | | |
201 | 218 | | |
202 | 219 | | |
| |||
213 | 230 | | |
214 | 231 | | |
215 | 232 | | |
216 | | - | |
| 233 | + | |
217 | 234 | | |
218 | | - | |
| 235 | + | |
219 | 236 | | |
220 | 237 | | |
221 | 238 | | |
| |||
0 commit comments