summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2017-05-11 20:21:19 -0400
committerAndrew Gallant <jamslam@gmail.com>2017-05-23 18:16:15 -0400
commit0f58a988016327016378a21bf4e335a41b51b2e9 (patch)
tree6dda8332c2b1452d8e08142832059c2b959f9b7e /src/main.rs
parentbc5f456b7e1827786ad6ca2f0e5b0993db7fd31a (diff)
Migrate to csv crate rewrite.0.12.0
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
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs
index 8b5977b..ca0f5ce 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,12 +1,7 @@
-/*!
-These are some docs.
-*/
-
-#![allow(deprecated)] // for connect -> join rename
-
extern crate byteorder;
extern crate chan;
extern crate csv;
+extern crate csv_index;
extern crate docopt;
extern crate filetime;
extern crate num_cpus;
@@ -71,6 +66,7 @@ macro_rules! command_list {
mod cmd;
mod config;
+mod index;
mod select;
mod util;