HNHacker News
TopNewBestAskShowJobs

vilark

20 karma · joined September 4, 2023

submissionscomments
vilark··on World's Smallest CSV Parser (C#)
FYI I got rid of this line, now I just don't add the quotes in the first place, unless the caller requests it. Performance didn't actually change, but it looks smarter. Thanks again for the review though.
vilark··on World's Smallest CSV Parser (C#)
30% performance improvement after removing the `yield return`, and readability is probably better too.
vilark··on World's Smallest CSV Parser (C#)
I will add a micro benchmark to see if the `yield return` is slowing things down, compared to just calling _sb.Add() inside Read*(). I will also see if it looks cleaner that way. To be honest, the `yield return` is currently in there just because I thought it's "cool".
vilark··on World's Smallest CSV Parser (C#)
The unit tests have an emoji test (which uses a surrogate pair). I thought I would have to use Runes, but it's not necessary. https://github.com/kjpgit/SmallestCSVParser/blob/master/Smal...
vilark··on World's Smallest CSV Parser (C#)
Thanks... I didn't think that would compile on .net 6, but it does!