Section • 4 episodes • 3 hr 4 min

Performance is particularly important for parsing because you will often need to parse megabytes, or potentially gigabytes, of data. We show that although our parser library has taken some steps towards efficiency, there is still a lot of room for improvement. We will also compare the combinator style of parsing to other more popular styles, and see that combinators can be nearly as performant as more ad-hoc styles.

Related content

Parsing is just one of many problems functional programming solves by defining a core, composable, transformable unit. We apply these exact same techniques to randomness and even app architecture!

3 hr 36 min
Composable Architecture
17 hr 50 min

Where to go from here

We can further improve the ergonomics of parsing with a relatively new feature of Swift: result builders.