Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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/sec
- Loading branch information