{"id":19384720,"url":"https://github.com/brunos3d/csv-parsers-comparison","last_synced_at":"2026-05-10T07:40:54.753Z","repository":{"id":42934900,"uuid":"237157091","full_name":"brunos3d/CSV-Parsers-Comparison","owner":"brunos3d","description":"🔥 NODE.JS - Comparative analysis of csv converters","archived":false,"fork":false,"pushed_at":"2022-03-26T02:41:10.000Z","size":3951,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-07T07:21:48.862Z","etag":null,"topics":["benchmark","comparison-tool","convert","csv","fast-csv","javascript","json","loader","measure","module","nodejs","papaparse","parser","time"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brunos3d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-30T06:59:01.000Z","updated_at":"2023-03-24T17:48:02.000Z","dependencies_parsed_at":"2022-09-07T06:01:35.105Z","dependency_job_id":null,"html_url":"https://github.com/brunos3d/CSV-Parsers-Comparison","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brunos3d%2FCSV-Parsers-Comparison","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brunos3d%2FCSV-Parsers-Comparison/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brunos3d%2FCSV-Parsers-Comparison/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brunos3d%2FCSV-Parsers-Comparison/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brunos3d","download_url":"https://codeload.github.com/brunos3d/CSV-Parsers-Comparison/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240522939,"owners_count":19815004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","comparison-tool","convert","csv","fast-csv","javascript","json","loader","measure","module","nodejs","papaparse","parser","time"],"created_at":"2024-11-10T09:32:14.749Z","updated_at":"2025-10-29T14:18:38.338Z","avatar_url":"https://github.com/brunos3d.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSV-Parsers-Comparison\n\n🔥 NODE.JS - Comparative analysis of csv converters.\n\n### Old Test Method (CSV String Parse)\n\nIn the old test method, the csv structure was passed as a string to the converters and the time that elapsed from that conversion was used for comparison:\n\n| module                 | exec time (10 rows) | exec time (1000 rows) |\n| ---------------------- | ------------------- | --------------------- |\n| csvtojsonV1.js         | 46.8337 ms          | 77.1661989 ms         |\n| csvtojsonV2.js         | 9.934 ms            | 24.36389 ms           |\n| papaparse.js           | 2.5822 ms           | 8.2563 ms             |\n| convert-csv-to-json.js | 0.58229 ms          | 3.556901 ms           |\n| csv-parser.js          | 8.917701 ms         | 35.272601 ms          |\n| csv-parse.js           | 13.1939 ms          | 74.1141 ms            |\n| fast-csv.js            | 12.8577 ms          | 58.502801 ms          |\n\n### Current Test Method (CSV File Stream Reader)\n\nIn the new method, use a `createReadStream` to read a file then it is connected to the converter using the `pipe` function, the time it takes from connecting the pipe to the `end` event is used for the comparison.\n\n| module        | exec time (10 rows) | exec time (1k rows) | exec time (10k rows) | exec time (100k rows) |\n| ------------- | ------------------- | ------------------- | -------------------- | --------------------- |\n| papaparse.js  | 10.8862 ms          | 22.5746 ms          | 81.1833 ms           | 337.1437 ms           |\n| csv-parser.js | 9.74559 ms          | 51.86 ms            | 111.473 ms           | 524.9644 ms           |\n| csv-parse.js  | 13.7337 ms          | 128.0882 ms         | 202.3191 ms          | 848.5843 ms           |\n| fast-csv.js   | 12.9665 ms          | 57.5728 ms          | 219.8584 ms          | 1 s 390.5334 ms       |\n\n\u003e Obs: _Some packages have not supported or demonstrated some type of bug and have been removed._\n\n## Modules\n\nThe comparator consists of modules.\nthey are in the [modules](./modules/) folder and maintain the following structure:\n\n```js\nmodule.exports = {\n    name: \"sample-module\",\n    pipeConnector(stream) {\n        // return stream.pipe(/* stream connector */);\n    }\n};\n```\n\n## CLI\n\nIt is possible to pass arguments to the analyzer use the `--help` or `-h` flag for more details:\n\n```console\nnode index.js --help\n```\n\nA very useful and important flag is the `--module` or just `-m`, it serves and is used to test each module individually:\n\n```console\nnode index.js -m papaparse\n```\n\nIt is still possible to select an `input` file to perform the conversion and `output` path to save the result:\n\n```console\nnode index.js -m fast-csv -i ./big-data.csv -d\n\n# or\n\nnode index.js -m fast-csv -i ./big-data.csv -o ./output.json\n```\n\n## Test Data\n\nThe tests were based on the [10-rows.csv](./10-rows.csv), [1k-rows.csv](./1k-rows.csv) and [10k-rows.csv](./10k-rows.csv) file which maintains the following structure:\n\n| \\_id                     | age | name             | gender | email                     | phone              |\n| ------------------------ | --- | ---------------- | ------ | ------------------------- | ------------------ |\n| 5e327d46d2bced0625350c64 | 20  | Kimberley Kinney | female | kimberleykinney@quarx.com | +55 (923) 451-3229 |\n| 5e327d4652112a31ca1cb009 | 25  | Frieda Roth      | female | friedaroth@quarx.com      | +55 (928) 580-3096 |\n| 5e327d4611b7676779e8706f | 31  | Bean Pope        | male   | beanpope@quarx.com        | +55 (839) 449-2320 |\n| ...                      | ... | ...              | ...    | ...                       | ...                |\n\nFor each module tested the result obtained by converting the csv must be equal to the following structure:\n\n```js\n[\n    {\n        _id: \"5e327d46d2bced0625350c64\",\n        age: \"20\",\n        name: \"Kimberley Kinney\",\n        gender: \"female\",\n        email: \"kimberleykinney@quarx.com\",\n        phone: \"+55 (923) 451-3229\"\n    }\n    // ...\n];\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunos3d%2Fcsv-parsers-comparison","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrunos3d%2Fcsv-parsers-comparison","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunos3d%2Fcsv-parsers-comparison/lists"}