I ran into DateFormatter/ISO8601DateFormatter speed issues again, and wrote a faster timestamp parser in Swift: https://github.com/juri/Parse3339
GitHub - juri/Parse3339: A fast pure Swift RFC 3339 timestamp parser

A fast pure Swift RFC 3339 timestamp parser. Contribute to juri/Parse3339 development by creating an account on GitHub.

GitHub
@juri I don't get it how every language's standard library contains an incredibly slow date parser. Which has led to otherwise intelligent people saying stuff like "oh, we'll just put the timestamp in the log file/message on the wire/something as a number of seconds since the epic because parsing dates is inherently slow" and I don't have the spoons to fight that all the time.
@tkalvas I appreciate them giving a full Unicode parser because it’s a lot of work. But yeah, why there isn’t an optimized specialization for the by far the most common case I have no idea. Hysterical raisins and inertia, I guess.
@juri What are the issues exactly? We’re using DateFormatter quite a lot.
@jtp42 Check the benchmarks in the README I have in the repo. With the current hardware it's not the worst thing in the world, especially if you do the parsing in a background queue and maybe use caching if you're likely to see duplicates, but still, I see stringFromDate in Instruments traces often enough that it felt worth it.

@juri Very fun! Since you mentioned liking parser combinators in your post, we thought it'd be fun to share how our Parsing library performed alongside yours: https://github.com/pointfreeco/swift-parsing/pull/305

It's nice to see how well combinators performed, though your library does win the photo finish 😉, and of course your goal of having a drop-in file with no other dependencies is far different from bringing in a whole parsing library.

Improve `Date` parser demo by stephencelis · Pull Request #305 · pointfreeco/swift-parsing

Incorporates a helper from @juri's parser to improve things in our demo a bit. Benchmarked against Parse3339 here and it's nice to see how well the relatively naive combinators performed by compari...

GitHub
@pointfreeco Oh cool, I love using your Parsing stuff! And I had completely forgotten you had that timestamp parser there already. If the project already included your library I would have definitely used it for this too.