This project compares the speed of different Node.JS csv parsers.
$ git clone https://github.com/Keyang/csvbench
$ npm install .
$ node ./index.js
All parsers (except lil-csv
) will simply do following
- stream in 1.csv and start to parse
- get content from 1st column of each row and write to a file
The lil-csv
would
- read the whole 1.csv without streaming
- get content from 1st column of each row and write to a file
1.csv
contains 300K lines
Here is some result running on a 2019 Macbook Pro:
$ node ./index.js
fast-csv: 1438.705ms
csv: 2346.760ms
csvtojson: 435.524ms
csv-parser: 878.652ms
papaparse: 430.366ms
lil-csv: 1135.411ms
$ node --version
v12.4.0