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

Add Sylvan.Data.Csv to the benchmarks #4

Closed MarkPflug closed 3 years ago

MarkPflug commented 3 years ago

Hello Joel.

I've also also put together some CsvBenchmarks for .NET. I've been claiming that my library, Sylvan.Data.Csv, is the fastest, so I was curious how I stacked up with your dataset. This PR adds my library to your benchmarks. I was aware of NReco and how fast it was, but I hadn't seen this mgholam.FastCsv library. I'll add it to my benchmarks too. I'm also adding the FluentCsv to mine (not yet on github).

joelverhagen commented 3 years ago

Woah, nice! Thanks!

Did we really start work on writing a big benchmark suite on the same day?

image

image

How does that happen, LOL!

MarkPflug commented 3 years ago

No, we didn't. I pulled the benchmarking code out of my main Sylvan library repo on that day. If you look in that repository you'd see history of this stuff going back to earlier in 2020. Still, pretty funny that date aligned.

MarkPflug commented 3 years ago

FWIW I added both mgholam.fastCSV and FluentCSV to my benchmarks on github. You'll probably see a notice from me trying to figure out a better way to implement the mgholam benchmark. The API was a little unclear to me, so if you know of a better way to use it I'd like to see it.

joelverhagen commented 3 years ago

Woah this thing is fast! I've updated my post: https://www.joelverhagen.com/blog/2020/12/fastest-net-csv-parsers

Nice work Mark!

MarkPflug commented 3 years ago

Hah, thanks! I will point out that it "cheats" a little, in that it employs a mechanism that benefits from highly repetitive data. Your benchmark data set happens to be highly repetitive due to how you construct it. If you look at the memory usage in the benchmark output it is probably even more illuminating than the difference in time.

Anyway, thanks for updating the article. I'm trying to get some momentum behind this project, so every little bit of exposure is helpful.