I ran some benchmarks against xsv, which was the only other open source fast csv manipulation tool that I could find online. xsv supports unicode files, and has a lot more features than csvm.
The ‘*4’ and ‘*2’ at the end of some command descriptions below indicate the number of threads. xsv uses a separate process for each command, and individual xsv processes don’t support multi threading. For details on how csvm does threading, checkout the Threading section in README.org
These benchmarks were generated by the run_benchmarks.bash script in the project dir (depends on hyperfine for benchmarking), on a laptop with an Intel i5 8th gen mobile processor. Its thermal throttling behaves differently for single and multi threaded loads, so this is just to give you a rough picture.
(view the file raw for slightly better formatting of the table)
command | avg [s] | cputime(user) [s] | cputime(system) [s] |
<l> | <r> | <r> | <r> |
---|---|---|---|
csvm:100mb-filter rows | 0.770 | 0.799 (103%) | 0.036 ( 4%) |
xsv :100mb-filter rows | 1.045 | 1.011 ( 96%) | 0.032 ( 3%) |
csvm:100mb-filter rows*4 | 0.354 | 1.366 (385%) | 0.079 ( 22%) |
csvm:100mb-filter columns | 0.938 | 0.965 (102%) | 0.038 ( 4%) |
xsv :100mb-filter columns | 0.692 | 0.652 ( 94%) | 0.039 ( 5%) |
csvm:100mb-filter columns*4 | 0.432 | 1.690 (391%) | 0.070 ( 16%) |
csvm:100mb-sort | 5.534 | 9.428 (170%) | 1.378 ( 24%) |
xsv :100mb-sort | 6.628 | 6.283 ( 94%) | 0.332 ( 5%) |
csvm:100mb-sort*2 | 4.386 | 12.791 (291%) | 2.269 ( 51%) |
csvm:100mb-filter rows+columns | 0.992 | 1.016 (102%) | 0.036 ( 3%) |
xsv :100mb-filter rows+columns | 1.268 | 2.009 (158%) | 0.112 ( 8%) |
csvm:100mb-filter rows+columns*4 | 0.453 | 1.774 (391%) | 0.071 ( 15%) |
csvm:1000mb-filter rows+columns | 8.895 | 9.171 (103%) | 0.268 ( 3%) |
xsv :1000mb-filter rows+columns | 11.205 | 17.670 (157%) | 1.005 ( 8%) |
csvm:1000mb-filter rows+columns*4 | 3.944 | 15.906 (403%) | 0.389 ( 9%) |
csvm:100mb:filter rows+columns+sort | 3.679 | 6.824 (185%) | 0.864 ( 23%) |
xsv :100mb:filter rows+columns+sort | 5.649 | 6.510 (115%) | 0.335 ( 5%) |
csvm:100mb:filter rows+columns+sort*2 | 2.811 | 9.191 (326%) | 1.154 ( 41%) |