Commit 6d29872
authored
Rewrite source parser to use
Resolves #350
From a quick test of a few repos I have cloned, this fixes some false
positives around unused deps in doc comments (one found in `diesel`, one
found in `sqlx`)
Perf looks to be unchanged:
```
> hyperfine -i cargo-shear-old cargo-shear
Benchmark 1: cargo-shear-old
Time (mean ± σ): 219.9 ms ± 4.7 ms [User: 946.7 ms, System: 54.5 ms]
Range (min … max): 212.2 ms … 230.4 ms 20 runs
Benchmark 2: cargo-shear
Time (mean ± σ): 222.8 ms ± 6.7 ms [User: 983.8 ms, System: 46.5 ms]
Range (min … max): 213.3 ms … 243.1 ms 20 runs
Summary
cargo-shear-old ran
1.01 ± 0.04 times faster than cargo-shear
```
`pulldown-cmark` does have SIMD support, but only on x86.pulldown-cmark for comment parsing (#353)1 parent 850553b commit 6d29872
File tree
7 files changed
+612
-719
lines changed- src
7 files changed
+612
-719
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 12 | + | |
18 | 13 | | |
19 | 14 | | |
20 | 15 | | |
| |||
23 | 18 | | |
24 | 19 | | |
25 | 20 | | |
26 | | - | |
| 21 | + | |
27 | 22 | | |
28 | 23 | | |
29 | 24 | | |
| |||
164 | 159 | | |
165 | 160 | | |
166 | 161 | | |
167 | | - | |
| 162 | + | |
168 | 163 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 164 | + | |
| 165 | + | |
173 | 166 | | |
174 | | - | |
| 167 | + | |
| 168 | + | |
175 | 169 | | |
176 | 170 | | |
177 | 171 | | |
| |||
236 | 230 | | |
237 | 231 | | |
238 | 232 | | |
239 | | - | |
240 | | - | |
| 233 | + | |
| 234 | + | |
241 | 235 | | |
242 | 236 | | |
243 | 237 | | |
| |||
287 | 281 | | |
288 | 282 | | |
289 | 283 | | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | 284 | | |
297 | 285 | | |
298 | 286 | | |
| |||
0 commit comments