Hacker News new | ask | show | jobs
by masklinn 3581 days ago
csv-parse is hardly the only CSV parser for node, and it is by far the slowest: https://github.com/phihag/csv-speedtest (csv2json depends on csv-parse, so it's unsurprising that it's even slower)
2 comments

I chose the most popular one on npm because Go and Python are using stdlib.
But 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).
The fastest streaming example on that list (csv-parser) is still 5× slower than Python.
Which 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.