3 ms·
csv-parse is hardly the only CSV parser for node, and it is by far the slowest: https://github.com/phihag/csv-speedtest https://github.com/phihag/csv-speedtest
by masklinn 10y ago
csv-parse is hardly the only CSV parser for node, and it is by far the slowest: https://github.com/phihag/csv-speedtest https://github.com/phihag/csv-speedtest (csv2json depends on csv-parse, so it's unsurprising that it's even slower)
- deno 10y agoI chose the most popular one on npm because Go and Python are using stdlib.
- elmigranto 10y agoBut you still wrote "faster than node.js" and not "faster that most popular npm module" (which aren't always of a great quality or performance-oriented).
- deno 10y agoYup[1]. Sorry! [1] https://meta.wikimedia.org/wiki/Cunningham%27s_Law https://meta.wikimedia.org/wiki/Cunningham%27s_Law
- deno 10y agoThe fastest streaming example on that list (csv-parser) is still 5× slower than Python.
- masklinn 10y agoWhich I'd assume has to do with the overhead of dispatching a ton of asynchronous events for relatively little parsed data rather than the intrinsic speed of node, the fastest synchronous parsers of the list are about on-par with Python.
- deleted 10y ago[deleted]