joelverhagen / NCsvPerf

A test bench for various .NET CSV parsing libraries
https://www.joelverhagen.com/blog/2020/12/fastest-net-csv-parsers
MIT License
69 stars 14 forks source link

Added benchmark for LinqToCsv #21

Closed JoshClose closed 3 years ago

JoshClose commented 3 years ago

Code is based off of section "Reading Raw Data Rows" https://www.codeproject.com/Articles/25133/LINQ-to-CSV-library#ReadingRawDataRows

joelverhagen commented 3 years ago

Looks like this one is also outputting data different:

 Group #1 (result JSON length = 921):
   - Csv
   - CsvHelper
   - CsvTextFieldParser
   - Ctl_Data
   - Cursively
   - FastCsvParser
   - FluentCsv
   - HomeGrown
   - LumenWorksCsvReader
   - mgholam_fastCSV
   - Microsoft_VisualBasic_FileIO_TextFieldParser
   - NReco_Csv
   - ServiceStack_Text
   - string_Split
   - SoftCircuits_CsvParser
   - Sylvan_Data_Csv
   - TinyCsvReader

 Group #2 (result JSON length = 939):
   - LinqToCsv
JoshClose commented 3 years ago

Is there a way to test this in your source? I'll make sure they are working with that check before making a pull request.

joelverhagen commented 3 years ago

My approach is to use the Test Explorer in Visual Studio. This will pop up the tests in the solution and you can run them there.

JoshClose commented 3 years ago

Oh, of course. lol Not sure what I was thinking.

jzabroski commented 3 years ago

Check encoding.

JoshClose commented 3 years ago

This library is returning null for empty strings.

JoshClose commented 3 years ago

Fixed.

joelverhagen commented 3 years ago

Awesome!