Seemingly every JS lib on Earth claims to have Blazing or Lightning Fast performance.
Fortunately, we don't have to rely on bench-marketing or 2017-era proclamations. "Trust, but verify" ;)
Date | 2023-09 |
---|---|
Hardware |
CPU: Ryzen 7 PRO 5850U (1.9GHz, 7nm, 15W TDP) RAM: 48GB SSD: Samsung SSD 980 PRO 1TB (NVMe) |
OS | EndeavourOS (Arch Linux) v6.4.11-arch2-1 x86_64 |
NodeJS | v20.6.0 |
The goal of this section is to give all parsers some simple synthetic datasets as a "peak performance" litmus test -- one without malformed data or delimiters within quotes. Parsing here is from CSV strings loaded into memory (no file streaming) and the output is string values, avoiding any additional overhead of conversion to numbers, booleans, dates, etc. While the usefulness of to-string parsing is limited to rendering rather than data processing, every token starts life as a string, so this is a good baseline.
We won't waste time on small datasets -- they're uninteresting. To create meaningful GC/memory pressure, but without hitting Node's default 2GB limit, we'll create three files with 20 columns x 10,000 rows.
litmus_strings.csv:
GtQ56taEqPynZE,wEAh,f5z,D1VVdO Np,WaFyN1Id8KDz,gVAlB5sRJs,cZjEklz7XcVE AK,oO46 fUXJi2QrUE,EsulmPCrEuVg97w,kUCRJ8RTo zDb,zYRwvEvRh3W,aGUntTXMf1,anh,pSoE516Q1g1Uc,hcxDfkqqRkI,IMDAN8Vr2RR2j,0ieUio5mjOx1NAZ,BbxKs0j2Zo,3mPOw8xR9,cbMJsnK
HCbe,029,PP1kw,igSUIHib6H3t,Pd98sXAUBj,Yut YJYk8aT4rhf,hxuo a2GHn45,88umhQYZQNd,gGDVF,fdDXRU7A,HQZ ,dPsxUFPaggqObue,PVXC7,2NI,9ak83UwObk,QohttaOxq,U SfWqpiDJLv,x5LA2EnN8,qduPA2y,xnP2vcSm5E
m 2tn5AF,ywO,tecaOIw6K1XLXf,osxLRmM0A3Eo,1EQLjeb5,e2 rfHd,eevJKj6AIVQhxte,yfI4iPGY,RXmanBadY,4Ev,g7HNv85Ng,vzncmimdX8t Hw1,4AxN07,WOOgygjd6ZW4pM,Bh4W3t43,eY CbkjgLlRZ,Z3brV,ISbn8cm,Gk8BZ5,aCYm
1ng84W6b0uZWh5s,0Drg6JKS,KjiKgA0a,JhPJ9,1oC2kSJgJ11m1,yIyn509bu2 w7I,lxVv1EsDmRSE7Tc,NA2nUS,DFUmeUY,UafqgUV,XCOmuBi43J,pVVPtFVhlHN,OkPbn8,nYk07P,uqK44MnKxROlHS,IYcAKLd,81x0,IS27VO,1ByRjQ3CbB3r,MwhoE
sUo,2lkn,HN52tnJL6C,ac6DLKMrd,MTBD8YWPn,vaia7aAIib,Cc9OzC7988GOY5,WyLIT1ExQ6Tw31,eqFmXyitt8lI,8Uc0FvDS,iCAXDAnrP,AywvZUAs, JILDeiNihD8,p65yWvtcL2e, JUh9F0BPQiN2,jBMStvPRSel,4wi7LTb3,ROk0PR,4UBO,bEaP
34fX8f,dsn,fCXtOP9UGtKWo,Eb7WdTT4tZlQG,6UF6dSLM3ObvPlc,eZ5VDR9koO,JBk,Si7st,MlF,MiQDGuXgpHQzja,BvyRxI5x5VImVd,bAFDmAXnLt,F 1V8rfgxW,SUmGlk,Yl09,g6ZxtEXt,3Vpv,27hf,XumxnyVmN,PktPl
IO9MyUIE4EtuC,XgIzj,WZMRg7,wvyC4exwl,dTQuZFuViN53,2OnH,XmxK0KG,89Snk,lNn7KAZg0,2zK,zjsBlJ5Mk,Cqm Gg,mKYq,IXKQiNa74kRf,4uRTZwVjnY5ydPP,Dku,sbQFpzv1 I,ON0ZB8,M86F3AnBoYTRqBi,4G1MOMC
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β litmus_strings.csv (1.9 MB, 20 cols x 10K rows) β
ββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 62 MiB baseline (MiB) β Types β Sample β
ββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β String.split() β 1.55M β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 295 β βββββ 43.9 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β uDSV β 1.34M β ββββββββββββββββββββββββββββββββββββββββββββββββ 255 β βββββ 47.4 β string β [["m 2tn5AF","ywO","tecaOIw6K1XLXf","osxLRmM0A3Eo" β
β csv-simple-parser β 1.07M β βββββββββββββββββββββββββββββββββββββββ 204 β ββββββ 56.8 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β but-csv β 928K β ββββββββββββββββββββββββββββββββββ 177 β ββββββ 52 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β PapaParse β 654K β ββββββββββββββββββββββββ 125 β ββββββββββββββββ 147 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β ACsv β 649K β ββββββββββββββββββββββββ 124 β ββββββββββββββββ 148 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β d3-dsv β 629K β βββββββββββββββββββββββ 120 β ββββββββββββββββ 150 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β csv-rex β 545K β ββββββββββββββββββββ 104 β ββββββββββββββββββ 171 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β node-csvtojson β 427K β ββββββββββββββββ 81.3 β ββββββββββββββββββ 170 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β comma-separated-values β 334K β ββββββββββββ 63.6 β ββββββββββββββββββββ 187 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β achilles-csv-parser β 308K β βββββββββββ 58.6 β ββββββββββββββββββββββ 205 β string β [{"GtQ56taEqPynZE":"m 2tn5AF","wEAh":"ywO","f5z":" β
β SheetJS β 265K β ββββββββββ 50.5 β βββββββββββββββββββββββββββ 257 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β @vanillaes/csv β 256K β ββββββββββ 48.8 β βββββββββββββββββ 156 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β CSVtoJSON β 247K β βββββββββ 47 β ββββββββββββββββββββββ 209 β string β [{"GtQ56taEqPynZE":"m 2tn5AF","wEAh":"ywO","f5z":" β
β csv-js β 240K β βββββββββ 45.7 β βββββββββββββββββββββ 196 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β @gregoranders/csv β 220K β ββββββββ 41.8 β βββββββββββββββββββββ 196 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β csv42 β 203K β ββββββββ 38.6 β ββββββββββββββββββββββββ 228 β string β [{"GtQ56taEqPynZE":"m 2tn5AF","wEAh":"ywO","f5z":" β
β dekkai β 193K β βββββββ 36.8 β ββββββββββββββββββββββββ 229 β string β [["m 2tn5AF","ywO","tecaOIw6K1XLXf","osxLRmM0A3Eo" β
β csv-parser (neat-csv) β 176K β βββββββ 33.6 β ββββββββββββββββ 152 β string β [{"GtQ56taEqPynZE":"m 2tn5AF","wEAh":"ywO","f5z":" β
β csv-parse/sync β 125K β βββββ 23.9 β βββββββββββββββ 139 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β jquery-csv β 101K β ββββ 19.3 β βββββββββββββββββββββββββββ 262 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β @fast-csv/parse β 78.7K β βββ 15 β ββββββββββββββββββ 174 β string β [{"GtQ56taEqPynZE0":"m 2tn5AF","wEAh1":"ywO","f5z2 β
β utils-dsv-base-parse β 61.7K β βββ 11.8 β ββββββββββββ 114 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β json-2-csv β 26.5K β β 5.05 β ββββββββββββββββββ 127 β string β [{"GtQ56taEqPynZE":"m 2tn5AF","wEAh":"ywO","f5z":" β
ββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
litmus_ints.csv:
zYs0DQRw06,E5mPdSri,Cku78,zLczDs,E5LUK4F 9BVo6B,HQPxv,FrBPxQ,06SOz,OLHX100,yjV8,3qLy,2rFthiPxsv,HEK85ebc3d2N4,BmKq,Q6gM,u5j,rP5K,ig5AI7ahLQV,7pHz9nMe1beBgt,oUnkBD
-8399,-5705,-5076,8780,8650,-55,7413,-1017,-958,-1898,-8616,-7101,-4804,-9040,-2021,-941,-123,-908,991,6120
6287,-60,7062,-3411,4613,-5840,209,5279,6342,3449,-2086,8958,8804,-2481,-8907,4886,1176,9852,3982,598
-1569,-1789,3670,-5489,4854,-8895,-7881,7532,4447,4722,-1872,-6194,-231,-3289,-6423,-7955,-971,5340,-5151,7831
7844,-9001,7369,-3476,-5166,-5033,7343,1943,9652,2846,8254,9169,5346,883,-4415,-9912,7947,3537,-6250,3020
-5205,5354,-8457,2277,-4508,-5735,2683,9630,-8114,5846,-1841,3216,-2016,-524,7711,-9511,2333,-548,-3192,-8615
3769,-8549,2816,-8398,7926,-5584,3378,-7553,8752,9940,-2517,-4928,2843,8994,4602,1816,7616,1308,7163,8847
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β litmus_ints.csv (1 MB, 20 cols x 10K rows) β
ββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 61 MiB baseline (MiB) β Types β Sample β
ββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV β 2.4M β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 247 β ββββ 36.5 β string β [["6287","-60","7062","-3411","4613","-5840","209" β
β csv-simple-parser β 1.68M β βββββββββββββββββββββββββββββββββββββββ 173 β βββββ 44.5 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β String.split() β 1.65M β ββββββββββββββββββββββββββββββββββββββ 170 β ββββ 38 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β d3-dsv β 1.33M β βββββββββββββββββββββββββββββββ 136 β ββββββ 57.6 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β but-csv β 960K β βββββββββββββββββββββββ 98.7 β βββββ 50.6 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β PapaParse β 743K β ββββββββββββββββββ 76.4 β βββββββββββββ 129 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β ACsv β 718K β βββββββββββββββββ 73.8 β βββββββββββββββ 147 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β csv-rex β 600K β ββββββββββββββ 61.7 β ββββββββββββββββ 161 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β @gregoranders/csv β 525K β βββββββββββββ 54 β ββββββββ 74.5 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β node-csvtojson β 523K β ββββββββββββ 53.8 β βββββββββββββββ 151 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β achilles-csv-parser β 493K β ββββββββββββ 50.7 β βββββββββββββββββ 170 β string β [{"zYs0DQRw06":"6287","E5mPdSri":"-60","Cku78":"70 β
β csv-js β 484K β ββββββββββββ 49.7 β βββββββββββββββββ 165 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β comma-separated-values β 411K β ββββββββββ 42.2 β βββββββββββββββββ 167 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β csv42 β 330K β ββββββββ 34 β βββββββββββββββ 151 β string β [{"zYs0DQRw06":"6287","E5mPdSri":"-60","Cku78":"70 β
β dekkai β 316K β ββββββββ 32.5 β ββββββββββββββββ 159 β string β [["6287","-60","7062","-3411","4613","-5840","209" β
β SheetJS β 304K β βββββββ 31.3 β βββββββββββββββββββββββββββ 277 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β CSVtoJSON β 285K β βββββββ 29.3 β ββββββββββββββββββββ 198 β string β [{"zYs0DQRw06":"6287","E5mPdSri":"-60","Cku78":"70 β
β @vanillaes/csv β 282K β βββββββ 29 β βββββββββββββββ 146 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β csv-parser (neat-csv) β 209K β βββββ 21.5 β βββββββββββββββββββ 187 β string β [{"zYs0DQRw06":"6287","E5mPdSri":"-60","Cku78":"70 β
β csv-parse/sync β 163K β ββββ 16.8 β βββββββββββββ 133 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β jquery-csv β 104K β βββ 10.7 β βββββββββββββββββββββββββ 255 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β utils-dsv-base-parse β 101K β βββ 10.3 β ββββββββββββ 117 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
β @fast-csv/parse β 95.6K β βββ 9.83 β βββββββββββββββββββββ 215 β string β [{"zYs0DQRw060":"6287","E5mPdSri1":"-60","Cku782": β
β json-2-csv β 26.8K β β 2.75 β ββββββββββββ 122 β string β [{"zYs0DQRw06":"6287","E5mPdSri":"-60","Cku78":"70 β
ββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
litmus_quoted.csv:
"DRadpUJ9 TCnUO0","92ZnE3J8IME4Ru","OG3z","EnrBwtb2xaDal g","3MwFXz8qaOTuQ5u","GyBHQsg","Frih5vgpsL","B11Kytl2YDc","0YEtlrydSd","yrO9iA1","eCmAcmYyGeNR24m","K1mFOGrMHYWUgSy","5xng15kApkp0pRB","WolN","TwsWWAy9rIpRbC","ZPJlo5jSzXc3c","4TRd","b9hy8Q","d7dpTAxOcE vr9b","MReW4wj"
"UPwF","5742","TWB88","-2020","ih2q9F5ijs","-8640","LE9i","3910","46XwuaEt0Sm","7431","CNyC raS","-4781","DPtF0vraiIUaDLc","-8628","4d th0 T","-7073","6mgEpy2uAKl","9896","f5MBvA7Euktx","2536"
"JitoL7gXbT","-3677"," NoqmZHgaSk14","1997","mtWFJB8","-932","Cd diKYJ4dICC","-4396","2gKgLXlI","3688","MGWSOfb9D47XO","-8634","37tz ","4555"," A8N","1450","OP7DG3f1W","8393","r6zQlRBnSXK25","8923"
"fEVMdY","-6699","P3gb","-8679","4K44LDhxWWt8v","-6500","TYCk1yRyh0ll","-1658"," XWsqj6ufUFW","1011","FTBEG","5186","tdjWe","-9921","g1jas8bkx4","-1551","JQe1B26U","-197","QkWIkVFY","-9050"
"SgU","8624","IycKYdvQ","191","OWfSmYlXpS","-1967","vEBT","-759","eRD78x7SnRQ","-4627","sASxM4tCjoED","-5443","f28khBJ6j","5170","G Av2l","-5249","ys8r6NMnlehWZ3n","2157","tMd1O6ddPJs","-3359"
"ZvFhsgYEVnsclM7","9355","icU8 7MQ","3713","zWXkXA","-242","oNYbYAtFV5UwbtG","8820","kRiNuVf","-1120","5ymOX0p ","9929","GffbQEkpLVA","286","0HWj","-1941","TLVNbPP1GdK","-6322","ksN4pZ4p8Zl","-3656"
"nTwqHDjzYl","5854","JkKFANbWRI","-4706","HKDJyYG3BsRADP","-4263","P5bGApH8C6pfjpq","5934","aBdJUPt5QhNe","-3924","y9Bve","-6668","kpRK","-3837","nhQaogmpKFvD2XZ","-6600"," 6N8gMAY1j","5925","VN8Kj","-4564"
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β litmus_quoted.csv (1.9 MB, 20 cols x 10K rows) β
ββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 66 MiB baseline (MiB) β Types β Sample β
ββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV β 1.6M β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 296 β ββββ 48.3 β string β [["JitoL7gXbT","-3677"," NoqmZHgaSk14","1997","mtW β
β csv-simple-parser β 1.4M β βββββββββββββββββββββββββββββββββββββββββββββββββ 260 β ββββ 45.6 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β but-csv β 887K β βββββββββββββββββββββββββββββββ 164 β ββββ 58.1 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β achilles-csv-parser β 399K β ββββββββββββββ 73.9 β ββββββ 81 β string β [{"DRadpUJ9 TCnUO0":"JitoL7gXbT","92ZnE3J8IME4Ru": β
β d3-dsv β 392K β ββββββββββββββ 72.6 β βββββββββββ 157 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β csv-rex β 352K β βββββββββββββ 65.1 β ββββββββββββ 165 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β PapaParse β 293K β βββββββββββ 54.2 β ββββββββββββ 171 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β csv-js β 289K β ββββββββββ 53.4 β ββββββββββββ 177 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β comma-separated-values β 237K β βββββββββ 43.9 β ββββββββββββ 165 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β dekkai β 222K β ββββββββ 41.2 β βββββββββββββββ 214 β string β [["JitoL7gXbT","-3677"," NoqmZHgaSk14","1997","mtW β
β @vanillaes/csv β 205K β ββββββββ 37.9 β βββββββββ 134 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β SheetJS β 204K β ββββββββ 37.7 β ββββββββββββββββ 229 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β ACsv β 202K β βββββββ 37.4 β ββββββββββββ 165 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β csv42 β 195K β βββββββ 36 β βββββββββββββ 187 β string β [{"DRadpUJ9 TCnUO0":"JitoL7gXbT","92ZnE3J8IME4Ru": β
β node-csvtojson β 186K β βββββββ 34.4 β βββββββββββ 162 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β CSVtoJSON β 179K β βββββββ 33.1 β ββββββββββββββ 197 β string β [{"\"DRadpUJ9TCnUO0\"":"JitoL7gXbT","\"92ZnE3J8IME β
β csv-parser (neat-csv) β 163K β ββββββ 30.2 β βββββββββββββ 183 β string β [{"DRadpUJ9 TCnUO0":"JitoL7gXbT","92ZnE3J8IME4Ru": β
β utils-dsv-base-parse β 120K β βββββ 22.2 β βββββββββ 133 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β @gregoranders/csv β 116K β ββββ 21.5 β ββββββββββ 145 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β csv-parse/sync β 108K β ββββ 20 β ββββββββββ 137 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β @fast-csv/parse β 69.2K β βββ 12.8 β βββββββββββββ 185 β string β [{"DRadpUJ9 TCnUO00":"JitoL7gXbT","92ZnE3J8IME4Ru1 β
β jquery-csv β 58.4K β βββ 10.8 β βββββββββββββββββββββββββββ 402 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β json-2-csv β 24.6K β β 4.56 β βββββββββββββ 190 β string β [{"DRadpUJ9 TCnUO0":"JitoL7gXbT","92ZnE3J8IME4Ru": β
ββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Notes:
- Bizzarely, the throughput of many parsers (including
String.split()
!) drops off a cliff with integer strings, even though we're not actually converting anything to integers, the memory usage is unchanged, and the dataset is 50% smaller. - A significant portion exhibits 40%-60% performance deterioration when quotes are introduced.
- Despite enabling
.supportQuotedField(true)
, CSVtoJSON does not properly remove the wrapping quotes from column names. - Some libs require non-default settings here to extract the most performance (e.g. omit value typing, output tuples instead of objects)
json-2-csv
is so irredeemably slow that it will be excluded from additional benchmarks to save my CPU from a premature meltdown.
Before moving on we need to talk about Dekkai and SheetJS.
These two libs have "native" formats that they parse to, and expose additional APIs to convert this format to plain JS arrays of records (as tuples or objects), which is the native format of all other libs. These APIs are used by benchmark in order to compare apples to apples, but this imposes some performace cost which we'll dissect here.
SheetJS is pretty straightforward with a predictable impact due to having a JS-native format that is directly convertible via XLSX.utils.sheet_to_json(sheet);
:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β litmus_strings.csv (1.9 MB, 20 cols x 10K rows) β
ββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 68 MiB baseline (MiB) β Types β Sample β
ββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β SheetJS (native) β 337K β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 64.3 β ββββββββββββββββββββββββββ 273 β s β [[{"t":"s","v":"HCbe"},{"t":"s","v":"029"},{"t":"s β
β SheetJS β 271K β βββββββββββββββββββββββββββββββββββββββββββββ 51.6 β βββββββββββββββββββββββββββ 286 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
ββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β litmus_ints.csv (1 MB, 20 cols x 10K rows) β
ββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 68 MiB baseline (MiB) β Types β Sample β
ββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β SheetJS (native) β 399K β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 41 β βββββββββββββββββββββββββββ 265 β s β [[{"t":"s","v":"-8399"},{"t":"s","v":"-5705"},{"t" β
β SheetJS β 303K β ββββββββββββββββββββββββββββββββββββββββββ 31.1 β ββββββββββββββββββββββββββ 247 β string β [["-8399","-5705","-5076","8780","8650","-55","741 β
ββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β litmus_quoted.csv (1.9 MB, 20 cols x 10K rows) β
ββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 74 MiB baseline (MiB) β Types β Sample β
ββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β SheetJS (native) β 234K β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 43.3 β βββββββββββββββββββββββββββ 267 β s β [[{"t":"s","v":"UPwF"},{"t":"s","v":"5742"},{"t":" β
β SheetJS β 207K β βββββββββββββββββββββββββββββββββββββββββββββββββ 38.4 β ββββββββββββββββββββββββ 230 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
ββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
If you are using SheetJS to load CSV files and continue to use its API to access the parsed data (instead of native JS methods), then this slowdown may not affect you.
The situation with Dekkai is a more nuanced than its own benchmarks would have you believe.
How Dekkai works is by parsing chunks of data in worker thread(s) using WASM. What I assume it does is simply stores arrays of offsets where it found row and column delimiters in each chunk. By itself, this process can be quite fast.
// native
let table = await dekkai.tableFromLocalFile(file);
So, what's the catch?
Well, when you actually need to touch the data, you pay a lot for that privilege.
// native + row-access
let table = await dekkai.tableFromLocalFile(file);
await table.forEach(row => {
// do nothing
});
// native + row-access + value-access
let table = await dekkai.tableFromLocalFile(file);
await table.forEach(row => {
row.forEach(val => {
// do nothing
});
});
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β litmus_quoted.csv (1.9 MB, 20 cols x 10K rows) β
βββββββββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 74 MiB baseline (MiB) β Types β Sample β
βββββββββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββΌβββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV β 1.62M β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 300 β ββββββ 46 β string β [["JitoL7gXbT","-3677"," NoqmZHgaSk14","1997","mtW β
β dekkai (native) β 1.14M β βββββββββββββββββββββββββββββββββββββββ 212 β ββββββββββββββ 106 β int,string β ["<native object>"] β
β dekkai (native, row access) β 524K β ββββββββββββββββββ 97 β ββββββββββββββββ 118 β int,string β ["<native object>"] β
β dekkai (native, value access) β 303K β βββββββββββ 56 β βββββββββββββββββ 130 β int,string β ["<native object>"] β
β PapaParse β 279K β ββββββββββ 51.6 β βββββββββββββββββββββββ 171 β string β [["UPwF","5742","TWB88","-2020","ih2q9F5ijs","-864 β
β dekkai β 232K β ββββββββ 43 β βββββββββββββββββββββββββββ 209 β string β [["JitoL7gXbT","-3677"," NoqmZHgaSk14","1997","mtW β
βββββββββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
If we want to compare apples to apples, we have to look at the bottom Dekkai entry, where we incur the cost of decoding and allocating every parsed value into native JS types, as they are in all other parsers.
Dekkai's benchmark shows it being 5x faster than Papa Parse when streaming and summing a single integer column of a 3.6M row dataset, but I haven't found evidence of this either.
Anyways...the remainder of this benchmark will use the Dekkai and SheetJS code which produces the same output as the other parsers. If you'd like to poke around the other variants, they're available in this repo.
Synthetic datsets can be too uniform to extrapolate actual performance in production environments. Testing with real data can surface inefficiencies in code paths that were either bypassed or infrequently executed.
Sensors Time Series
https://github.com/Schlumberger/hackathon/blob/master/backend/dataset/data-large.csv
- 36 MB
- 37 cols x 130K rows
- 3 header rows, empty first col heading
- purely numeric, unquoted
,ESP01,ESP01,ESP01,ESP01,ESP01,ESP01,ESP02,ESP02,ESP02,ESP02,ESP02,ESP02,ESP03,ESP03,ESP03,ESP03,ESP03,ESP03,IC01,IC01,IC01,IC01,IC01,IC01,IC01,IC01,IC01,IC02,IC02,IC02,IC02,IC02,IC02,IC02,IC02,IC02
time,DISCHARGE_PRESSURE,INTAKE_PRESSURE,INTAKE_TEMPERATURE,MOTOR_TEMP,VSDFREQOUT,VSDMOTAMPS,DISCHARGE_PRESSURE,INTAKE_PRESSURE,INTAKE_TEMPERATURE,MOTOR_TEMP,VSDFREQOUT,VSDMOTAMPS,DISCHARGE_PRESSURE,INTAKE_PRESSURE,INTAKE_TEMPERATURE,MOTOR_TEMP,VSDFREQOUT,VSDMOTAMPS,CHOKE_POSITION,PRESSURE1,PRESSURE2,TEMPERATURE1,TEMPERATURE2,WATER_CUT,LIQUID_RATE,WATER_RATE,OIL_RATE,CHOKE_POSITION,PRESSURE1,PRESSURE2,TEMPERATURE1,TEMPERATURE2,WATER_CUT,LIQUID_RATE,WATER_RATE,OIL_RATE
s,psia,psia,K,K,Hz,A,psia,psia,K,K,Hz,A,psia,psia,K,K,Hz,A,%,psia,psia,degF,degF,%,bbl/d,bbl/d,bbl/d,%,psia,psia,degF,degF,%,bbl/d,bbl/d,bbl/d
1370044800,4819440.062,4645092.555,382.8436706,383.0596235,0,2,13935372.4,4230328.642,358.828813,375.6540512,45.01385132,191.3370908,5872264.787,5487537.33,346.35,351.65,0,0,1,2500,2498,192,197,0,0,0,0,0,2489,2485,196,193,0.2,0,0,0
1370045100,4869044.81,4630605.41,382.8270592,382.9445269,0,2,13064140.62,4141697.565,359.4253646,379.0754459,43.99295035,195.107323,5872264.787,5487537.33,346.35,351.65,0,0,1,2500,2498,194,196,0,0,0,0,0,2489,2485,198,196,0.2,0,0,0
1370045400,4824754.919,4684340.8,382.8626879,382.9402203,0,2,14110557.56,4430323.167,357.2496335,374.2655201,44.16140698,189.5892357,5872264.787,5487537.33,346.35,351.65,0,0,1,2500,2498,197,192,0,0,0,0,0,2489,2485,195,193,0.5,0,0,0
1370045700,4849769.046,4697244.12,382.862196,382.9384828,0,2,12781664.74,3917750.211,359.2356498,378.5094705,45.02241074,199.5982215,5872264.787,5487537.33,346.35,351.65,0,0,1,2500,2498,191,196,0,0,0,0,0,2489,2485,196,198,0.8,0,0,0
1370046000,4838199.888,4705090.494,382.855058,382.9485043,0,2,15252131.42,4355878.258,356.3494983,373.59845,44.04228406,209.9629697,5872264.787,5487537.33,346.35,351.65,0,0,1,2500,2498,197,191,0,0,0,0,0,2489,2485,195,196,0.3,0,0,0
1370046300,4874408.563,4669871.883,382.8602124,382.9429073,0,2,13265647.71,3927390.758,358.2028666,375.2891046,44.01957626,195.5540406,5872264.787,5487537.33,346.35,351.65,0,0,1,2500,2498,198,192,0,0,0,0,0,2489,2485,193,194,0.6,0,0,0
For bench purposes, we'll simplify to a single header row with unique names, since some libs have trouble with multi-row headers and empty or duplicate column names:
A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β data-large2.csv (36 MB, 37 cols x 130K rows) β
ββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 277 MiB baseline (MiB) β Types β Sample β
ββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV β 518K β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 144 β ββββββββββββββββββββββββββ 1.86K β string β [["1370045100","4869044.81","4630605.41","382.8270 β
β csv-simple-parser β 464K β ββββββββββββββββββββββββββββββββββββββββββββββββββ 129 β βββββββββββββββββββββββ 1.69K β string β [["1370044800","4819440.062","4645092.555","382.84 β
β String.split() β 462K β ββββββββββββββββββββββββββββββββββββββββββββββββββ 128 β ββββββββββββββββββββββββ 1.76K β string β [["1370044800","4819440.062","4645092.555","382.84 β
β PapaParse β 396K β βββββββββββββββββββββββββββββββββββββββββββ 110 β βββββββββββββββββββββββ 1.69K β string β [["1370044800","4819440.062","4645092.555","382.84 β
β ACsv β 378K β βββββββββββββββββββββββββββββββββββββββββ 105 β ββββββββββββββββββββββββ 1.76K β string β [["1370044800","4819440.062","4645092.555","382.84 β
β d3-dsv β 374K β ββββββββββββββββββββββββββββββββββββββββ 104 β ββββββββββββββββββββββββ 1.75K β string β [["1370044800","4819440.062","4645092.555","382.84 β
β but-csv β 361K β βββββββββββββββββββββββββββββββββββββββ 100 β βββββββββββββββββββββββ 1.69K β string β [["1370044800","4819440.062","4645092.555","382.84 β
β csv-rex β 332K β ββββββββββββββββββββββββββββββββββββ 92.1 β ββββββββββββββββββββββ 1.57K β string β [["1370044800","4819440.062","4645092.555","382.84 β
β comma-separated-values β 223K β ββββββββββββββββββββββββ 61.9 β ββββββββββββββ 1.01K β string β [["1370044800","4819440.062","4645092.555","382.84 β
β csv-js β 186K β ββββββββββββββββββββ 51.5 β βββββββββββββββ 1.05K β string β [["1370044800","4819440.062","4645092.555","382.84 β
β achilles-csv-parser β 180K β ββββββββββββββββββββ 50 β βββββββββββββββββββββββ 1.65K β string β [{"A":"1370045100","B":"4869044.81","C":"4630605.4 β
β csv42 β 177K β βββββββββββββββββββ 49.2 β βββββββββββββββββββββββ 1.65K β string β [{"A":"1370045100","B":"4869044.81","C":"4630605.4 β
β CSVtoJSON β 160K β ββββββββββββββββββ 44.4 β βββββββββββββββββββββββ 1.64K β string β [{"A":"1370045100","B":"4869044.81","C":"4630605.4 β
β SheetJS β 152K β βββββββββββββββββ 42.1 β ββββββββββββββββββββ 1.48K β string β [["1370044800","4819440.062","4645092.555","382.84 β
β @gregoranders/csv β 151K β βββββββββββββββββ 41.9 β ββββββββββββ 877 β string β [["1370044800","4819440.062","4645092.555","382.84 β
β dekkai β 149K β ββββββββββββββββ 41.3 β ββββββββ 565 β string β [["1370045100","4869044.81","4630605.41","382.8270 β
β @vanillaes/csv β 143K β ββββββββββββββββ 39.8 β ββββββββββββ 873 β string β [["1370044800","4819440.062","4645092.555","382.84 β
β node-csvtojson β 120K β βββββββββββββ 33.4 β ββββββββββββ 847 β string β [["1370044800","4819440.062","4645092.555","382.84 β
β csv-parser (neat-csv) β 108K β ββββββββββββ 30 β βββββββββββββββ 1.07K β string β [{"A":"1370045100","B":"4869044.81","C":"4630605.4 β
β csv-parse/sync β 75.6K β βββββββββ 20.9 β βββββββββ 596 β string β [["1370044800","4819440.062","4645092.555","382.84 β
β jquery-csv β 45.9K β βββββ 12.7 β βββββββββββββββββββββββββββ 1.99K β string β [["1370044800","4819440.062","4645092.555","382.84 β
β @fast-csv/parse β 43.3K β βββββ 12 β ββββββββββββ 840 β string β [{"A0":"1370045100","B1":"4869044.81","C2":"463060 β
β utils-dsv-base-parse β 38K β βββββ 10.5 β βββββ 336 β string β [["1370044800","4819440.062","4645092.555","382.84 β
ββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Notes:
- With this 36MB dataset, all the faster libs bump into the 2GB memory limit. With GC'd/JIT'ed runtimes, lower peak memory does not imply faster perf (as was the correlation in the synthetic runs).
- uDSV is not faster by the same huge margin over PapaParse as in the synthetic
litmus_ints.csv
case where it was 251 MiB/s vs 74 MiB/s.
USA ZIP Codes
https://simplemaps.com/data/us-zips
https://simplemaps.com/static/data/us-zips/1.82/basic/simplemaps_uszips_basicv1.82.zip
- 6 MB
- 18 cols x 34K rows
- everything quoted
- strings, numbers, booleans, JSON (with escaped quotes)
"zip","lat","lng","city","state_id","state_name","zcta","parent_zcta","population","density","county_fips","county_name","county_weights","county_names_all","county_fips_all","imprecise","military","timezone"
"00601","18.18027","-66.75266","Adjuntas","PR","Puerto Rico","TRUE","","17126","102.6","72001","Adjuntas","{""72001"": 98.73, ""72141"": 1.27}","Adjuntas|Utuado","72001|72141","FALSE","FALSE","America/Puerto_Rico"
"00602","18.36075","-67.17541","Aguada","PR","Puerto Rico","TRUE","","37895","482.5","72003","Aguada","{""72003"": 100}","Aguada","72003","FALSE","FALSE","America/Puerto_Rico"
"00603","18.45744","-67.12225","Aguadilla","PR","Puerto Rico","TRUE","","49136","552.4","72005","Aguadilla","{""72005"": 99.76, ""72099"": 0.24}","Aguadilla|Moca","72005|72099","FALSE","FALSE","America/Puerto_Rico"
"00606","18.16585","-66.93716","Maricao","PR","Puerto Rico","TRUE","","5751","50.1","72093","Maricao","{""72093"": 82.26, ""72153"": 11.68, ""72121"": 6.06}","Maricao|Yauco|Sabana Grande","72093|72153|72121","FALSE","FALSE","America/Puerto_Rico"
"00610","18.2911","-67.12243","Anasco","PR","Puerto Rico","TRUE","","26153","272.1","72011","AΓ±asco","{""72011"": 96.71, ""72099"": 2.81, ""72083"": 0.37, ""72003"": 0.11}","AΓ±asco|Moca|Las MarΓas|Aguada","72011|72099|72083|72003","FALSE","FALSE","America/Puerto_Rico"
"00611","18.27698","-66.80688","Angeles","PR","Puerto Rico","TRUE","","1283","46.5","72141","Utuado","{""72141"": 100}","Utuado","72141","FALSE","FALSE","America/Puerto_Rico"
"00612","18.41283","-66.7051","Arecibo","PR","Puerto Rico","TRUE","","64090","325.0","72013","Arecibo","{""72013"": 98.86, ""72065"": 0.94, ""72017"": 0.2}","Arecibo|Hatillo|Barceloneta","72013|72065|72017","FALSE","FALSE","America/Puerto_Rico"
"00616","18.41878","-66.6679","Bajadero","PR","Puerto Rico","TRUE","","10186","361.3","72013","Arecibo","{""72013"": 100}","Arecibo","72013","FALSE","FALSE","America/Puerto_Rico"
"00617","18.44598","-66.56006","Barceloneta","PR","Puerto Rico","TRUE","","22803","479.7","72017","Barceloneta","{""72017"": 99.63, ""72054"": 0.37}","Barceloneta|Florida","72017|72054","FALSE","FALSE","America/Puerto_Rico"
"00622","17.98892","-67.1566","Boqueron","PR","Puerto Rico","TRUE","","7751","96.0","72023","Cabo Rojo","{""72023"": 100}","Cabo Rojo","72023","FALSE","FALSE","America/Puerto_Rico"
"00623","18.08429","-67.15336","Cabo Rojo","PR","Puerto Rico","TRUE","","39652","390.6","72023","Cabo Rojo","{""72023"": 100}","Cabo Rojo","72023","FALSE","FALSE","America/Puerto_Rico"
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β uszips.csv (6 MB, 18 cols x 34K rows) β
ββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 111 MiB baseline (MiB) β Types β Sample β
ββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV β 782K β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 140 β βββββββββββ 382 β string β [["00602","18.36075","-67.17541","Aguada","PR","Pu β
β csv-simple-parser β 682K β ββββββββββββββββββββββββββββββββββββββββββββββββ 122 β ββββββββββ 378 β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β achilles-csv-parser β 469K β βββββββββββββββββββββββββββββββββ 83.8 β ββββββββββ 362 β string β [{"zip":"00602","lat":"18.36075","lng":"-67.17541" β
β d3-dsv β 433K β βββββββββββββββββββββββββββββββ 77.4 β ββββββββββ 358 β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β csv-rex β 346K β βββββββββββββββββββββββββ 61.9 β βββββββββββ 386 β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β PapaParse β 305K β ββββββββββββββββββββββ 54.5 β ββββββββ 300 β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β csv42 β 296K β βββββββββββββββββββββ 52.9 β βββββββββ 332 β string β [{"zip":"00602","lat":"18.36075","lng":"-67.17541" β
β csv-js β 285K β βββββββββββββββββββββ 50.9 β ββββββββββββ 449 β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β comma-separated-values β 258K β βββββββββββββββββββ 46.1 β ββββββββββ 354 β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β dekkai β 248K β ββββββββββββββββββ 44.3 β ββββββββββββ 441 β string β [["00602","18.36075","-67.17541","Aguada","PR","Pu β
β CSVtoJSON β 245K β ββββββββββββββββββ 43.8 β βββββββββββ 399 β string β [{"\"zip\"":"00602","\"lat\"":"18.36075","\"lng\"" β
β csv-parser (neat-csv) β 218K β ββββββββββββββββ 39 β ββββββββ 290 β string β [{"zip":"00602","lat":"18.36075","lng":"-67.17541" β
β ACsv β 218K β ββββββββββββββββ 39 β βββββββ 260 β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β SheetJS β 208K β βββββββββββββββ 37.1 β βββββββββββββββ 538 β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β @vanillaes/csv β 200K β βββββββββββββββ 35.8 β ββββββββββ 368 β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β node-csvtojson β 165K β ββββββββββββ 29.4 β βββββββββββ 395 β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β csv-parse/sync β 125K β βββββββββ 22.4 β βββββββββ 314 β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β @fast-csv/parse β 78.2K β ββββββ 14 β βββββββ 255 β string β [{"zip0":"00602","lat1":"18.36075","lng2":"-67.175 β
β jquery-csv β 55.1K β ββββ 9.85 β βββββββββββββββββββββββββββ 1.03K β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β but-csv β --- β Wrong row count! Expected: 33790, Actual: 1 β --- β --- β --- β
β @gregoranders/csv β --- β Invalid CSV at 1:109 β --- β --- β --- β
β utils-dsv-base-parse β --- β unexpected error. Encountered an invalid record. Field 17 o β --- β --- β --- β
ββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
House Price Index
https://www.fhfa.gov/DataTools/Downloads/Pages/House-Price-Index-Datasets.aspx
https://www.fhfa.gov/HPI_master.csv
- 10 MB
- 10 cols x 120K rows
- only necessary things quoted
- sometimes empty last col
- strings, numbers
hpi_type,hpi_flavor,frequency,level,place_name,place_id,yr,period,index_nsa,index_sa
traditional,purchase-only,monthly,USA or Census Division,East North Central Division,DV_ENC,1991,1,100.00,100.00
traditional,purchase-only,monthly,USA or Census Division,East North Central Division,DV_ENC,1991,2,100.91,100.96
traditional,purchase-only,monthly,USA or Census Division,East North Central Division,DV_ENC,1991,3,101.31,100.92
...
traditional,all-transactions,quarterly,MSA,"Austin-Round Rock-Georgetown, TX",12420,2005,3,163.58,
traditional,all-transactions,quarterly,MSA,"Austin-Round Rock-Georgetown, TX",12420,2005,4,165.64,
traditional,all-transactions,quarterly,MSA,"Austin-Round Rock-Georgetown, TX",12420,2006,1,167.68,
traditional,all-transactions,quarterly,MSA,"Austin-Round Rock-Georgetown, TX",12420,2006,2,173.22,
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β HPI_master.csv (10 MB, 10 cols x 120K rows) β
ββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 146 MiB baseline (MiB) β Types β Sample β
ββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV β 1.74M β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 147 β βββββββββββββ 676 β string β [["traditional","purchase-only","monthly","USA or β
β csv-simple-parser β 1.66M β βββββββββββββββββββββββββββββββββββββββββββββββββββββ 139 β ββββββββββββ 628 β string β [["traditional","purchase-only","monthly","USA or β
β d3-dsv β 1.37M β ββββββββββββββββββββββββββββββββββββββββββββ 115 β βββββββββββββ 682 β string β [["traditional","purchase-only","monthly","USA or β
β PapaParse β 1.35M β βββββββββββββββββββββββββββββββββββββββββββ 114 β ββββββββββββ 626 β string β [["traditional","purchase-only","monthly","USA or β
β but-csv β 1.31M β ββββββββββββββββββββββββββββββββββββββββββ 110 β ββββββββββ 506 β string β [["traditional","purchase-only","monthly","USA or β
β ACsv β 1.21M β βββββββββββββββββββββββββββββββββββββββ 102 β βββββββββββ 571 β string β [["traditional","purchase-only","monthly","USA or β
β achilles-csv-parser β 1.1M β βββββββββββββββββββββββββββββββββββ 92.6 β ββββββββββ 491 β string β [{"hpi_type":"traditional","hpi_flavor":"purchase- β
β csv-rex β 1.09M β βββββββββββββββββββββββββββββββββββ 91.6 β βββββββββββ 563 β string β [["traditional","purchase-only","monthly","USA or β
β csv42 β 1.06M β ββββββββββββββββββββββββββββββββββ 88.7 β βββββββββββ 543 β string β [{"hpi_type":"traditional","hpi_flavor":"purchase- β
β comma-separated-values β 689K β ββββββββββββββββββββββ 57.9 β ββββββββββ 513 β string β [["traditional","purchase-only","monthly","USA or β
β csv-js β 523K β βββββββββββββββββ 43.9 β βββββββββββββ 680 β string β [["traditional","purchase-only","monthly","USA or β
β SheetJS β 520K β βββββββββββββββββ 43.7 β βββββββββββββββββ 892 β string β [["traditional","purchase-only","monthly","USA or β
β CSVtoJSON β 476K β ββββββββββββββββ 40 β βββββββββββββ 681 β string β [{"hpi_type":"traditional","hpi_flavor":"purchase- β
β @vanillaes/csv β 474K β βββββββββββββββ 39.8 β ββββββββ 406 β string β [["traditional","purchase-only","monthly","USA or β
β csv-parser (neat-csv) β 442K β ββββββββββββββ 37.2 β βββββββββ 443 β string β [{"hpi_type":"traditional","hpi_flavor":"purchase- β
β dekkai β 435K β ββββββββββββββ 36.6 β ββββββββββ 536 β string β [["traditional","purchase-only","monthly","USA or β
β @gregoranders/csv β 390K β βββββββββββββ 32.8 β βββββββββββ 583 β string β [["traditional","purchase-only","monthly","USA or β
β node-csvtojson β 361K β ββββββββββββ 30.4 β βββββββββββββ 658 β string β [["traditional","purchase-only","monthly","USA or β
β csv-parse/sync β 241K β ββββββββ 20.2 β ββββββ 320 β string β [["traditional","purchase-only","monthly","USA or β
β jquery-csv β 177K β ββββββ 14.9 β βββββββββββββββββββββββββββ 1.46K β string β [["traditional","purchase-only","monthly","USA or β
β @fast-csv/parse β 164K β ββββββ 13.8 β ββββββββ 418 β string β [{"hpi_type0":"traditional","hpi_flavor1":"purchas β
β utils-dsv-base-parse β 151K β βββββ 12.7 β ββββ 191 β string β [["traditional","purchase-only","monthly","USA or β
ββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Earthquakes
https://earthquake.usgs.gov/earthquakes/feed/v1.0/csv.php
https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.csv
https://github.com/mafintosh/csv-parser/blob/master/test/fixtures/large-dataset.csv
- 1.1 MB
- 15 cols x 7.3K rows
- only necessary things quoted
- empty cols
- strings, numbers, dates
time,latitude,longitude,depth,mag,magType,nst,gap,dmin,rms,net,id,updated,place,type
2015-12-22T18:45:11.000Z,59.9988,-152.7191,100,3,ml,,,,0.54,ak,ak12293661,2015-12-22T19:09:29.736Z,"54km S of Redoubt Volcano, Alaska",earthquake
2015-12-22T18:38:34.000Z,62.9616,-148.7532,65.4,1.9,ml,,,,0.51,ak,ak12293651,2015-12-22T18:47:23.287Z,"48km SSE of Cantwell, Alaska",earthquake
2015-12-22T18:38:01.820Z,19.2129993,-155.4179993,33.79,2.56,ml,56,142,0.03113,0.21,hv,hv61132446,2015-12-22T18:44:13.729Z,"6km E of Pahala, Hawaii",earthquake
2015-12-22T18:38:00.000Z,63.7218,-147.083,56.8,2.4,ml,,,,0.95,ak,ak12293653,2015-12-22T18:54:45.265Z,"75km WSW of Delta Junction, Alaska",earthquake
2015-12-22T18:28:57.000Z,64.0769,-148.8226,14.2,2,ml,,,,0.8,ak,ak12293626,2015-12-22T18:40:06.324Z,"25km NNE of Healy, Alaska",earthquake
2015-12-22T18:25:40.000Z,61.4715,-150.7697,55,1.6,ml,,,,0.17,ak,ak12293627,2015-12-22T18:40:07.276Z,"43km W of Big Lake, Alaska",earthquake
2015-12-22T18:13:01.786Z,38.6879,-118.6035,7.8,1.6,ml,10,105.79,0.087,0.0799,nn,nn00523604,2015-12-22T18:26:07.654Z,"18km N of Hawthorne, Nevada",earthquake
2015-12-22T18:08:44.630Z,19.3326664,-155.1049957,4.52,1.92,md,39,152,0.05121,0.28,hv,hv61132431,2015-12-22T18:11:59.980Z,"17km SE of Volcano, Hawaii",earthquake
2015-12-22T18:04:36.240Z,19.4381676,-155.326004,1.12,2.05,ml,14,314,0.03707,0.33,hv,hv61132421,2015-12-22T18:10:19.220Z,"9km W of Volcano, Hawaii",earthquake
2015-12-22T17:47:04.720Z,36.0003319,-120.5598297,2.18,1.74,md,20,86,0.0209,0.06,nc,nc72570651,2015-12-22T17:48:42.120Z,"23km SW of Coalinga, California",earthquake
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β large-dataset.csv (1.1 MB, 15 cols x 7.3K rows) β
ββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 58 MiB baseline (MiB) β Types β Sample β
ββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV β 2.46M β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 367 β ββββββ 44.8 β string β [["2015-12-22T18:38:34.000Z","62.9616","-148.7532" β
β csv-simple-parser β 2.16M β βββββββββββββββββββββββββββββββββββββββββββββββββ 323 β ββββββ 49.4 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β but-csv β 1.58M β ββββββββββββββββββββββββββββββββββββ 236 β ββββββ 43.4 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β d3-dsv β 1.54M β βββββββββββββββββββββββββββββββββββ 230 β ββββββ 44 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β ACsv β 1.4M β ββββββββββββββββββββββββββββββββ 210 β βββββ 39 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β achilles-csv-parser β 935K β βββββββββββββββββββββ 140 β ββββββ 46.8 β string β [{"time":"2015-12-22T18:38:34.000Z","latitude":"62 β
β PapaParse β 875K β ββββββββββββββββββββ 131 β ββββββββββββββ 109 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β csv-rex β 864K β ββββββββββββββββββββ 129 β ββββββββββββββ 110 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β csv42 β 827K β βββββββββββββββββββ 124 β ββββββ 46.8 β string β [{"time":"2015-12-22T18:38:34.000Z","latitude":"62 β
β node-csvtojson β 612K β ββββββββββββββ 91.5 β ββββββββββββββ 111 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β comma-separated-values β 573K β βββββββββββββ 85.7 β ββββββ 46.2 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β SheetJS β 393K β βββββββββ 58.7 β ββββββββββββββββββ 144 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β @vanillaes/csv β 342K β ββββββββ 51.1 β βββββββββββββ 104 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β csv-parser (neat-csv) β 278K β βββββββ 41.5 β ββββββββββββββββββ 147 β string β [{"time":"2015-12-22T18:38:34.000Z","latitude":"62 β
β csv-js β 264K β ββββββ 39.4 β ββββββββββββββββββββββββββ 209 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β @gregoranders/csv β 218K β βββββ 32.6 β ββββββββββββββββββββββββ 194 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β CSVtoJSON β 217K β βββββ 32.4 β ββββββββββββββββββββββββ 196 β string β [{"time":"2015-12-22T18:38:34.000Z","latitude":"62 β
β dekkai β 217K β βββββ 32.4 β βββββββββββββββββββββββββββ 222 β string β [["2015-12-22T18:38:34.000Z","62.9616","-148.7532" β
β csv-parse/sync β 164K β ββββ 24.6 β βββββββ 51.4 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β jquery-csv β 127K β βββ 19 β βββββββββββββββββββββ 170 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β @fast-csv/parse β 111K β βββ 16.6 β βββββββββββββββ 117 β string β [{"time0":"2015-12-22T18:38:34.000Z","latitude1":" β
β utils-dsv-base-parse β 88.5K β ββ 13.2 β ββββββ 42.2 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
ββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
If you have numeric data, booleans, dates, or embedded JSON, you'll likely want to convert these from strings to native JS types.
Each parser does this differently:
- Some provide a setting for this natively
- Others expose a user-defined, per-value callback that leaves conversion to the user
- The rest expect you to convert the output yourself
Thing is, due to crappy built-in implementations, the fastest option is usually the last one...if you know what you're doing. Consequently, very few users will actually reap the full performance of #3; most will pick #1 or seek out libraries that offer it.
For example, here's the difference with PapaParse (untyped, natively-typed, manually-typed):
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β data-large2.csv (36 MB, 37 cols x 130K rows) β
βββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 47 MiB baseline (MiB) β Types β Sample β
βββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β PapaParse β 387K β ββββββββββββββββββββββββββββββββββββββββββββββββββ 107 β ββββββββββββββββββββββββββββββ 1.93K β string β [["1370044800","4819440.062","4645092.555","382.84 β
β PapaParse typed [] (manual) β 257K β ββββββββββββββββββββββββββββββββββ 71.1 β ββββββββββββββββββ 1.16K β number β [[1370044800,4819440.062,4645092.555,382.8436706,3 β
β PapaParse typed [] (native) β 117K β ββββββββββββββββ 32.4 β ββββββββββββββββββ 1.12K β number β [[1370044800,4819440.062,4645092.555,382.8436706,3 β
βββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Option #3 (manually post-processed) integer conversion is more than 2x faster than using the official dynamicTyping: true
(Option #1).
This route is available to all libs, but performance fully depends on user competence.
Since we're here to assess libs and not users, we'll only compare libs with some kind of type conversion API.
Sensors Time Series
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β data-large2.csv (36 MB, 37 cols x 130K rows) β
βββββββββββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 275 MiB baseline (MiB) β Types β Sample β
βββββββββββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV typed [] β 443K β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 124 β βββββββββ 394 β number β [[1370045100,4869044.81,4630605.41,382.8270592,382 β
β csv-simple-parser typed [] β 322K β βββββββββββββββββββββββββββββββββββββββββ 89.4 β βββββββββββββ 617 β number β [[1370044800,4819440.062,4645092.555,382.8436706,3 β
β csv-rex typed [] β 268K β ββββββββββββββββββββββββββββββββββ 74.3 β ββββββ 276 β number β [[1370044800,4819440.062,4645092.555,382.8436706,3 β
β d3-dsv typed [] β 220K β ββββββββββββββββββββββββββββ 61.1 β ββββββββββββ 565 β number β [[1370044800,4819440.062,4645092.555,382.8436706,3 β
β comma-separated-values typed {} β 191K β ββββββββββββββββββββββββ 53 β βββββββββββββββββ 808 β number β [{"A":1370045100,"B":4869044.81,"C":4630605.41,"D" β
β csv42 typed {} β 153K β ββββββββββββββββββββ 42.5 β ββββββββββββββββββββββββββ 1.26K β number β [{"A":1370045100,"B":4869044.81,"C":4630605.41,"D" β
β dekkai typed [] β 148K β βββββββββββββββββββ 41 β βββββββ 321 β number β [[1370045100,4869044.81,4630605.41,382.8270592,382 β
β achilles-csv-parser typed {} β 146K β βββββββββββββββββββ 40.4 β ββββββββββββββββββββββββββ 1.26K β number β [{"A":1370045100,"B":4869044.81,"C":4630605.41,"D" β
β @vanillaes/csv typed [] β 120K β βββββββββββββββ 33.3 β βββββ 224 β number β [[1370044800,4819440.062,4645092.555,382.8436706,3 β
β csv-js typed [] β 120K β βββββββββββββββ 33.3 β ββββββ 254 β number β [[1370044800,4819440.062,4645092.555,382.8436706,3 β
β CSVtoJSON typed {} β 118K β βββββββββββββββ 32.7 β ββββββββββββββββββββββ 1.03K β number β [{"A":1370045100,"B":4869044.81,"C":4630605.41,"D" β
β PapaParse typed [] β 113K β βββββββββββββββ 31.3 β βββββββββββββββββββ 891 β number β [[1370044800,4819440.062,4645092.555,382.8436706,3 β
β SheetJS typed {} β 98.7K β βββββββββββββ 27.4 β βββββββββββββββββββββββββββ 1.31K β number β [[1370044800,4819440.062,4645092.555,382.8436706,3 β
β csv-parser (neat-csv) typed {} β 91.5K β ββββββββββββ 25.4 β ββββββββββββββββββ 844 β number β [{"A":1370045100,"B":4869044.81,"C":4630605.41,"D" β
β csv-parse/sync typed [] β 58.3K β ββββββββ 16.2 β βββββ 234 β number β [[1370044800,4819440.062,4645092.555,382.8436706,3 β
βββββββββββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Notes:
- uDSV offers the simplicity of Option #1 with the performance of Option #3.
- I could not find typing options for these parsers:
but-csv
,@fast-csv/parse
,jquery-csv
,@gregoranders/csv
,@stdlib/utils-dsv-base-parse
. ACsv.js
andnode-csvtojson
provide typing only via static column config, so they're excluded for not being generic.
USA ZIP Codes
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β uszips.csv (6 MB, 18 cols x 34K rows) β
βββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 115 MiB baseline (MiB) β Types β Sample β
βββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV typed [] β 516K β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 92.3 β ββββββββββββββββββββ 262 β boolean,null,number,object,string β [[602,18.36075,-67.17541,"Aguada","PR","Puerto Ric β
β csv-simple-parser typed [] β 395K β βββββββββββββββββββββββββββββββββββββββββββ 70.5 β βββββββββββββββββββββββ 314 β boolean,null,number,object,string β [[601,18.18027,-66.75266,"Adjuntas","PR","Puerto R β
β achilles-csv-parser typed {} β 321K β βββββββββββββββββββββββββββββββββββ 57.3 β βββββββββββββββββ 230 β boolean,null,number,object,string β [{"zip":602,"lat":18.36075,"lng":-67.17541,"city": β
β d3-dsv typed [] β 263K β βββββββββββββββββββββββββββββ 47 β βββββββββββββββββββ 250 β null,number,string β [[601,18.18027,-66.75266,"Adjuntas","PR","Puerto R β
β comma-separated-values typed {} β 257K β ββββββββββββββββββββββββββββ 46 β βββββββββββββββββββββββ 304 β number,string β [{"zip":602,"lat":18.36075,"lng":-67.17541,"city": β
β csv-rex typed [] β 248K β βββββββββββββββββββββββββββ 44.4 β βββββββββββββββββββββ 276 β boolean,null,number,object,string β [[601,18.18027,-66.75266,"Adjuntas","PR","Puerto R β
β dekkai typed [] β 235K β ββββββββββββββββββββββββββ 42 β ββββββββββββββββββββββββββ 354 β NaN,number,string β [[602,18.36075,-67.17541,"Aguada","PR","Puerto Ric β
β csv-js typed [] β 221K β ββββββββββββββββββββββββ 39.5 β ββββββββββββββββββββββββ 325 β boolean,number,string β [[601,18.18027,-66.75266,"Adjuntas","PR","Puerto R β
β CSVtoJSON typed {} β 217K β ββββββββββββββββββββββββ 38.8 β βββββββββββββββββ 221 β number,string β [{"\"zip\"":602,"\"lat\"":18.36075,"\"lng\"":-67.1 β
β csv42 typed {} β 195K β βββββββββββββββββββββ 34.8 β βββββββββββββββββ 233 β number,object,string β [{"zip":602,"lat":18.36075,"lng":-67.17541,"city": β
β csv-parser (neat-csv) typed {} β 180K β ββββββββββββββββββββ 32.2 β βββββββββββββββββββ 250 β boolean,null,number,object,string β [{"zip":602,"lat":18.36075,"lng":-67.17541,"city": β
β PapaParse typed [] β 163K β ββββββββββββββββββ 29 β βββββββββββββββββββββββββββ 365 β boolean,null,number,string β [[601,18.18027,-66.75266,"Adjuntas","PR","Puerto R β
β @vanillaes/csv typed [] β 155K β βββββββββββββββββ 27.8 β βββββββββββββββββ 227 β NaN,number,string β [[601,18.18027,-66.75266,"Adjuntas","PR","Puerto R β
β SheetJS typed {} β 92.7K β ββββββββββ 16.6 β βββββββββββββββββββββββββββ 370 β boolean,number,string β [[601,18.18027,-66.75266,"Adjuntas","PR","Puerto R β
β csv-parse/sync typed [] β 20.8K β βββ 3.72 β βββββββββββββββββββββββ 312 β number,string β [[601,18.18027,-66.75266,"Adjuntas","PR","Puerto R β
βββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Notes:
- The values in the Types column are important. All parsers that show
object
calledJSON.parse()
on the embedded JSON strings for each of 34K rows in this dataset. Additionally, there are 3 columns of boolean values here, so those withoutboolean
did not do the work of converting 3 * 34k TRUE/FALSE strings.
House Price Index
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β HPI_master.csv (10 MB, 10 cols x 120K rows) β
βββββββββββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 145 MiB baseline (MiB) β Types β Sample β
βββββββββββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββΌββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV typed [] β 1.44M β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 121 β βββββββββββββββββββ 544 β number,string β [["traditional","purchase-only","monthly","USA or β
β csv-simple-parser typed [] β 1.04M β ββββββββββββββββββββββββββββββββββββββββ 87.5 β ββββββββββββββββββ 518 β number,string β [["traditional","purchase-only","monthly","USA or β
β csv42 typed {} β 916K β ββββββββββββββββββββββββββββββββββββ 76.9 β ββββββββββββββββ 458 β number,string β [{"hpi_type":"traditional","hpi_flavor":"purchase- β
β achilles-csv-parser typed {} β 836K β ββββββββββββββββββββββββββββββββ 70.3 β ββββββββββββββββ 465 β number,string β [{"hpi_type":"traditional","hpi_flavor":"purchase- β
β csv-rex typed [] β 796K β βββββββββββββββββββββββββββββββ 66.9 β ββββββββββββββββββ 507 β number,string β [["traditional","purchase-only","monthly","USA or β
β d3-dsv typed [] β 637K β βββββββββββββββββββββββββ 53.5 β βββββββββββββββ 417 β number,string β [["traditional","purchase-only","monthly","USA or β
β comma-separated-values typed {} β 557K β ββββββββββββββββββββββ 46.8 β ββββββββββββββββββ 515 β number,string β [{"hpi_type":"traditional","hpi_flavor":"purchase- β
β PapaParse typed [] β 488K β βββββββββββββββββββ 41 β βββββββββββββββββββββ 594 β number,string β [["traditional","purchase-only","monthly","USA or β
β CSVtoJSON typed {} β 445K β βββββββββββββββββ 37.4 β ββββββββββββββ 392 β number,string β [{"hpi_type":"traditional","hpi_flavor":"purchase- β
β csv-js typed [] β 433K β βββββββββββββββββ 36.4 β βββββββββββββββ 432 β number,string β [["traditional","purchase-only","monthly","USA or β
β dekkai typed [] β 408K β ββββββββββββββββ 34.3 β ββββββββββββββββββ 515 β NaN,number,string β [["traditional","purchase-only","monthly","USA or β
β csv-parser (neat-csv) typed {} β 391K β βββββββββββββββ 32.9 β ββββββββββββββ 405 β number,string β [{"hpi_type":"traditional","hpi_flavor":"purchase- β
β @vanillaes/csv typed [] β 381K β βββββββββββββββ 32 β ββββββββββββββ 389 β number,string β [["traditional","purchase-only","monthly","USA or β
β SheetJS typed {} β 196K β ββββββββ 16.5 β βββββββββββββββββββββββββββ 798 β number,string β [["traditional","purchase-only","monthly","USA or β
β csv-parse/sync typed [] β 38.3K β ββ 3.22 β βββββββββββββββββ 488 β number,string β [["traditional","purchase-only","monthly","USA or β
βββββββββββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Earthquakes
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β large-dataset.csv (1.1 MB, 15 cols x 7.3K rows) β
βββββββββββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 56 MiB baseline (MiB) β Types β Sample β
βββββββββββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV typed [] β 875K β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 131 β βββββββ 55 β date,null,number,string β [["2015-12-22T18:38:34.000Z",62.9616,-148.7532,65. β
β csv-simple-parser typed [] β 836K β βββββββββββββββββββββββββββββββββββββββββββββββββββββ 125 β ββββββ 46.5 β null,number,string β [["2015-12-22T18:45:11.000Z",59.9988,-152.7191,100 β
β csv42 typed {} β 573K β ββββββββββββββββββββββββββββββββββββ 85.6 β ββββββ 42.1 β null,number,string β [{"time":"2015-12-22T18:38:34.000Z","latitude":62. β
β achilles-csv-parser typed {} β 549K β βββββββββββββββββββββββββββββββββββ 82 β ββββββ 46.1 β null,number,string β [{"time":"2015-12-22T18:38:34.000Z","latitude":62. β
β csv-rex typed [] β 545K β βββββββββββββββββββββββββββββββββββ 81.4 β βββββββββββββ 97 β null,number,string β [["2015-12-22T18:45:11.000Z",59.9988,-152.7191,100 β
β comma-separated-values typed {} β 453K β βββββββββββββββββββββββββββββ 67.7 β ββββββ 47.6 β number,string β [{"time":"2015-12-22T18:38:34.000Z","latitude":62. β
β d3-dsv typed [] β 330K β βββββββββββββββββββββ 49.4 β βββββββ 52.8 β date,null,number,string β [["2015-12-22T18:45:11.000Z",59.9988,-152.7191,100 β
β PapaParse typed [] β 265K β βββββββββββββββββ 39.6 β ββββββββββββββββ 126 β date,null,number,string β [["2015-12-22T18:45:11.000Z",59.9988,-152.7191,100 β
β csv-parser (neat-csv) typed {} β 236K β βββββββββββββββ 35.3 β ββββββββββββββββ 122 β null,number,string β [{"time":"2015-12-22T18:38:34.000Z","latitude":62. β
β @vanillaes/csv typed [] β 234K β βββββββββββββββ 35 β ββββββββββββ 95.2 β NaN,number,string β [[2015,59.9988,-152.7191,100,3,"ml",null,null,null β
β csv-js typed [] β 233K β βββββββββββββββ 34.8 β βββββββββββββββ 119 β number,string β [["2015-12-22T18:45:11.000Z",59.9988,-152.7191,100 β
β CSVtoJSON typed {} β 220K β ββββββββββββββ 32.9 β βββββββββββββββ 118 β number,string β [{"time":"2015-12-22T18:38:34.000Z","latitude":62. β
β dekkai typed [] β 196K β βββββββββββββ 29.3 β βββββββββββββββββββββββββββ 216 β NaN,number,string β [["2015-12-22T18:38:34.000Z",62.9616,-148.7532,65. β
β SheetJS typed {} β 91.6K β ββββββ 13.7 β βββββββββββββββ 116 β number,string β [["2015-12-22T18:45:11.000Z",59.9988,-152.7191,100 β
β csv-parse/sync typed [] β 28.5K β ββ 4.26 β βββββββββββββββ 115 β date,number,string β [["2015-12-22T18:45:11.000Z",59.9988,-152.7191,100 β
βββββββββββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Notes:
- Creating
Date
objects is really expensive, and there are 2 * 7.3K of them here. Parsers withoutdate
listed in Types column have not done this work. For instance, if we omitDate
conversion from uDSV typing:βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β large-dataset.csv (1.1 MB, 15 cols x 7.3K rows) β βββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β Name β Rows/s β Throughput (MiB/s) β RSS above 63 MiB baseline (MiB) β Types β Sample β βββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β uDSV typed [] β 1.29M β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 193 β βββββββββββββββββββββββββββ 46.5 β null,number,string β [["2015-12-22T18:38:34.000Z",62.9616,-148.7532,65. β βββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
There are two categories for streaming: retained and non-retained.
Streaming that retains will keep all parsed output in memory while non-retained will discard the parsed data after running some reducer on each chunk, such as sum or filter.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β data-large2.csv (36 MB, 37 cols x 130K rows) β
βββββββββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 280 MiB baseline (MiB) β Types β Sample β
βββββββββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β PapaParse (stream) β 374K β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 104 β ββββββββββββββββββββββββββ 1.58K β string β [["1370044800","4819440.062","4645092.555","382.84 β
β uDSV (stream) β 357K β βββββββββββββββββββββββββββββββββββββββββββββββββββββ 99 β βββββββββββββββββββββββββββ 1.68K β string β [["1370045100","4869044.81","4630605.41","382.8270 β
β node-csvtojson (stream) β 282K β ββββββββββββββββββββββββββββββββββββββββββ 78.1 β ββββββββββββββββββββββ 1.32K β string β [["1370044800","4819440.062","4645092.555","382.84 β
β csv-rex (stream) β 245K β ββββββββββββββββββββββββββββββββββββ 67.8 β ββββββββββββββββββββ 1.23K β string β [["1370044800","4819440.062","4645092.555","382.84 β
β ya-csv (stream) β 164K β βββββββββββββββββββββββββ 45.5 β βββββββββββββββ 873 β string β [["1370044800","4819440.062","4645092.555","382.84 β
β dekkai (stream) β 160K β ββββββββββββββββββββββββ 44.5 β ββββββββ 489 β string β [["1370045100","4869044.81","4630605.41","382.8270 β
β csv-parser (stream) β 97.2K β βββββββββββββββ 27 β ββββββββββββββββββββββ 1.32K β string β [{"A":"1370045100","B":"4869044.81","C":"4630605.4 β
β utils-dsv-base-parse (stream) β 33.8K β βββββ 9.36 β ββββββ 342 β string β [["1370044800","4819440.062","4645092.555","382.84 β
βββββββββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β uszips.csv (6 MB, 18 cols x 34K rows) β
βββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 118 MiB baseline (MiB) β Types β Sample β
βββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV (stream) β 550K β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 98.2 β βββββββββββββββββββββββββ 422 β string β [["00602","18.36075","-67.17541","Aguada","PR","Pu β
β dekkai (stream) β 296K β ββββββββββββββββββββββββββββββ 52.9 β ββββββββββββββββββββββββββ 449 β string β [["00602","18.36075","-67.17541","Aguada","PR","Pu β
β csv-rex (stream) β 262K β βββββββββββββββββββββββββββ 46.8 β βββββββββββββββββββββ 353 β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β PapaParse (stream) β 261K β βββββββββββββββββββββββββββ 46.6 β βββββββββββββββββββββββββββ 470 β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β ya-csv (stream) β 239K β ββββββββββββββββββββββββ 42.6 β ββββββββββββββββββββββββββ 451 β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β csv-parser (stream) β 192K β ββββββββββββββββββββ 34.4 β ββββββββββββββββ 274 β string β [{"zip":"00602","lat":"18.36075","lng":"-67.17541" β
β node-csvtojson (stream) β 180K β βββββββββββββββββββ 32.2 β ββββββββββββββββββββββ 365 β string β [["00601","18.18027","-66.75266","Adjuntas","PR"," β
β utils-dsv-base-parse (stream) β --- β unexpected error. Encountered an invalid record. Field 17 o β --- β --- β --- β
βββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β HPI_master.csv (10 MB, 10 cols x 120K rows) β
βββββββββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 148 MiB baseline (MiB) β Types β Sample β
βββββββββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV (stream) β 1.28M β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 108 β βββββββββββββββββββββββββββ 625 β string β [["traditional","purchase-only","monthly","USA or β
β PapaParse (stream) β 1.06M β ββββββββββββββββββββββββββββββββββββββββββββββ 89.3 β βββββββββββββββββββββββββββ 603 β string β [["traditional","purchase-only","monthly","USA or β
β csv-rex (stream) β 697K β ββββββββββββββββββββββββββββββ 58.6 β βββββββββββββββββββββββ 512 β string β [["traditional","purchase-only","monthly","USA or β
β node-csvtojson (stream) β 642K β ββββββββββββββββββββββββββββ 54 β βββββββββββββββββββββββββ 572 β string β [["traditional","purchase-only","monthly","USA or β
β dekkai (stream) β 511K β ββββββββββββββββββββββ 42.9 β βββββββββββββββββββββββ 521 β string β [["traditional","purchase-only","monthly","USA or β
β ya-csv (stream) β 452K β ββββββββββββββββββββ 38 β ββββββββββββββββββββββββββ 584 β string β [["traditional","purchase-only","monthly","USA or β
β csv-parser (stream) β 404K β ββββββββββββββββββ 33.9 β βββββββββββββββββ 374 β string β [{"hpi_type":"traditional","hpi_flavor":"purchase- β
β utils-dsv-base-parse (stream) β 135K β ββββββ 11.3 β βββββββββ 190 β string β [["traditional","purchase-only","monthly","USA or β
βββββββββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β large-dataset.csv (1.1 MB, 15 cols x 7.3K rows) β
βββββββββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 63 MiB baseline (MiB) β Types β Sample β
βββββββββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV (stream) β 1.76M β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 263 β βββββββ 56.3 β string β [["2015-12-22T18:38:34.000Z","62.9616","-148.7532" β
β PapaParse (stream) β 766K β ββββββββββββββββββββββββ 115 β βββββββββββββ 111 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β node-csvtojson (stream) β 570K β ββββββββββββββββββ 85.2 β βββββββ 56.4 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β csv-rex (stream) β 551K β ββββββββββββββββββ 82.4 β ββββββββββββββ 120 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β csv-parser (stream) β 267K β βββββββββ 40 β βββββββ 58.7 β string β [{"time":"2015-12-22T18:38:34.000Z","latitude":"62 β
β dekkai (stream) β 258K β βββββββββ 38.6 β βββββββββββββββββββββββββββ 243 β string β [["2015-12-22T18:38:34.000Z","62.9616","-148.7532" β
β ya-csv (stream) β 246K β ββββββββ 36.7 β ββββββββββββββββββββββ 193 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
β utils-dsv-base-parse (stream) β 78.4K β βββ 11.7 β ββββββββββ 85 β string β [["2015-12-22T18:45:11.000Z","59.9988","-152.7191" β
βββββββββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
We're going to use Dekkai's benchmark, which sums a single parsed column of a 15-col x 3.6M-row dataset. My guess is what's being measured there is this commented-out loop.
Airports
https://www.kaggle.com/datasets/flashgordon/usa-airport-dataset
"Origin_airport","Destination_airport","Origin_city","Destination_city","Passengers","Seats","Flights","Distance","Fly_date","Origin_population","Destination_population","Org_airport_lat","Org_airport_long","Dest_airport_lat","Dest_airport_long"
"MHK","AMW","Manhattan, KS","Ames, IA",21,30,1,254,2008-10-01,122049,86219,39.140998840332,-96.6707992553711,NA,NA
"EUG","RDM","Eugene, OR","Bend, OR",41,396,22,103,1990-11-01,284093,76034,44.1245994567871,-123.21199798584,44.2541008,-121.1500015
"EUG","RDM","Eugene, OR","Bend, OR",88,342,19,103,1990-12-01,284093,76034,44.1245994567871,-123.21199798584,44.2541008,-121.1500015
"MFR","RDM","Medford, OR","Bend, OR",0,18,1,156,1990-02-01,147300,76034,42.3741989135742,-122.873001098633,44.2541008,-121.1500015
"MFR","RDM","Medford, OR","Bend, OR",11,18,1,156,1990-03-01,147300,76034,42.3741989135742,-122.873001098633,44.2541008,-121.1500015
"SEA","RDM","Seattle, WA","Bend, OR",8,18,1,228,1990-02-01,5154164,76034,47.4490013122559,-122.30899810791,44.2541008,-121.1500015
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Airports2.csv (510 MB, 1 cols x 2 rows) β
βββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 49 MiB baseline (MiB) β Types β Sample β
βββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββ€
β uDSV (stream, sum) β 0.935 β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 238 β βββββββββ 39 β number β [[134277303]] β
β dekkai (stream, sum) β 0.762 β βββββββββββββββββββββββββββββββββββββββββββββ 194 β βββββββββββββββββββββββββββ 117 β number β [[134277303]] β
β PapaParse (stream, sum) β 0.502 β ββββββββββββββββββββββββββββββ 128 β ββββββββββ 40.6 β number β [[134277303]] β
βββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββ
Notes:
- When using logically-similar code, I'm not able to get the extremely slow performance numbers they show for Papa Parse in their bench results.
Here's a run with our numeric litmus dataset, which shows similar results:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β litmus_ints.csv (1 MB, 1 cols x 2 rows) β
βββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 51 MiB baseline (MiB) β Types β Sample β
βββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββ€
β uDSV (stream, sum) β 265 β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 136 β βββββββββββββ 37.8 β number β [[441296]] β
β dekkai (stream, sum) β 246 β ββββββββββββββββββββββββββββββββββββββββββββββββββββ 126 β βββββββββββββββββββββββββββ 79.8 β number β [[441296]] β
β PapaParse (stream, sum) β 229 β ββββββββββββββββββββββββββββββββββββββββββββββββ 118 β ββββββββββββββββ 45.7 β number β [[441296]] β
βββββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββ
For libs that support different output formats (tuples, objects, columns, nested objects), there is often a performance penalty for when switching away from the default.
We're not going to look at every lib here, but switching PapaParse to object mode (header: true
) looks like this:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β litmus_strings.csv (1.9 MB, 20 cols x 10K rows) β
ββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 68 MiB baseline (MiB) β Types β Sample β
ββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β PapaParse β 649K β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 124 β ββββββββββββββββββ 140 β string β [["HCbe","029","PP1kw","igSUIHib6H3t","Pd98sXAUBj" β
β PapaParse {} β 237K β βββββββββββββββββββββ 45.2 β βββββββββββββββββββββββββββ 210 β string β [{"GtQ56taEqPynZE":"m 2tn5AF","wEAh":"ywO","f5z":" β
ββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Here are uDSV output formats compared:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β litmus_strings.csv (1.9 MB, 20 cols x 10K rows) β
βββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 70 MiB baseline (MiB) β Types β Sample β
βββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββΌβββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV [] β 1.32M β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 251 β ββββββββββββββββββββββ 45.9 β string β [["m 2tn5AF","ywO","tecaOIw6K1XLXf","osxLRmM0A3Eo" β
β uDSV {} β 1.3M β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 247 β ββββββββββββββββββββββ 46 β string β [{"GtQ56taEqPynZE":"m 2tn5AF","wEAh":"ywO","f5z":" β
β uDSV cols β 1.13M β ββββββββββββββββββββββββββββββββββββββββββββββββ 215 β βββββββββββββββββββββββββββ 57.9 β string β [["029","ywO","0Drg6JKS","2lkn","dsn","XgIzj","7Yg β
βββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ
csv42 was written to improve on parsing and stringifying nested JSON structures to and from CSV: https://jsoneditoronline.org/indepth/parse/csv-parser-javascript/
While uDSV does not currently offer CSV generation, it does offer ~4.5x faster deep parsing to structured objects:
csv42_nested_10k.csv
_type,name,description,location.city,location.street,location.geo[0],location.geo[1],speed,heading,size[0],size[1],size[2],"field with , delimiter","field with "" double quote"
item,Item 1,Item 1 description in text,Rotterdam,Main street,60.4770016,72.9305049,5.4,128.3,3.4,5.1,0.9,"value with , delimiter","value with "" double quote"
item,Item 2,Item 2 description in text,Rotterdam,Main street,91.9676756,14.0882905,5.4,128.3,3.4,5.1,0.9,"value with , delimiter","value with "" double quote"
item,Item 3,Item 3 description in text,Rotterdam,Main street,14.8318042,36.3390012,5.4,128.3,3.4,5.1,0.9,"value with , delimiter","value with "" double quote"
item,Item 4,Item 4 description in text,Rotterdam,Main street,25.8552221,94.8248616,5.4,128.3,3.4,5.1,0.9,"value with , delimiter","value with "" double quote"
item,Item 5,Item 5 description in text,Rotterdam,Main street,32.1099148,48.0531795,5.4,128.3,3.4,5.1,0.9,"value with , delimiter","value with "" double quote"
item,Item 6,Item 6 description in text,Rotterdam,Main street,32.2514711,92.7409621,5.4,128.3,3.4,5.1,0.9,"value with , delimiter","value with "" double quote"
[
{
_type: 'item',
name: 'Item 1',
description: 'Item 1 description in text',
location: {
city: 'Rotterdam',
street: 'Main street',
geo: [ 51.9280712, 4.4207888 ]
},
speed: 5.4,
heading: 128.3,
size: [ 3.4, 5.1, 0.9 ],
}
]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β csv42_nested_10k.csv (1.6 MB, 9 cols x 10K rows) β
βββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Name β Rows/s β Throughput (MiB/s) β RSS above 49 MiB baseline (MiB) β Types β Sample β
βββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β uDSV typed deep {} β 1.14M β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ 178 β βββββββββββββ 62.5 β array,number,object,string β [{"_type":"item","name":"Item 2","description":"It β
β csv42 typed deep {} β 258K β βββββββββββββ 40.5 β βββββββββββββββββββββββββββ 131 β array,number,object,string β [{"_type":"item","name":"Item 2","description":"It β
βββββββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββ