This repository was archived by the owner on Apr 24, 2025. It is now read-only.
Commit 0f58a98
committed
Migrate to csv crate rewrite.
This commit resists the urge to refactor/rewrite xsv and ports it over
to the new CSV API. It made a lot of things cleaner and even improved
the performance of core commands like `count`, `sample`, `search`,
`select` and `slice`.
This also removes the last remaining (dubious) uses of `unsafe` within
xsv.
Benchmarks before/after:
benchmark before after
count 0.26s 175.05 MB/sec 0.11 413.76 MB/sec
flatten 4.53s 10.04 MB/sec 4.54 10.02 MB/sec
flatten_condensed 4.72s 9.64 MB/sec 4.45 10.22 MB/sec
frequency 1.91s 23.82 MB/sec 1.82 25.00 MB/sec
index 0.28s 162.54 MB/sec 0.12 379.28 MB/sec
sample_10 0.43s 105.84 MB/sec 0.18 252.85 MB/sec
sample_1000 0.44s 103.44 MB/sec 0.18 252.85 MB/sec
sample_100000 0.50s 91.02 MB/sec 0.29 156.94 MB/sec
search 0.59s 77.14 MB/sec 0.27 168.56 MB/sec
select 0.41s 111.00 MB/sec 0.14 325.09 MB/sec
sort 2.59s 17.57 MB/sec 2.18 20.87 MB/sec
slice_one_middle 0.22s 206.88 MB/sec 0.08 568.92 MB/sec
slice_one_middle_index 0.01s 4551.36 MB/sec 0.01 4551.36 MB/sec
stats 1.26s 36.12 MB/sec 1.09 41.75 MB/sec
stats_index 0.19s 239.54 MB/sec 0.15 303.42 MB/sec
stats_everything 2.13s 21.36 MB/sec 1.94 23.46 MB/sec
stats_everything_index 1.00s 45.51 MB/sec 0.93 48.93 MB/sec1 parent bc5f456 commit 0f58a98
File tree
32 files changed
+919
-703
lines changed- src
- cmd
- tests
32 files changed
+919
-703
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | 1 | | |
16 | 2 | | |
17 | 3 | | |
| |||
33 | 19 | | |
34 | 20 | | |
35 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
36 | 29 | | |
37 | 30 | | |
38 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
0 commit comments