The #Rust crate `csv` has a very clever design.
It parses CSV one byte at a time using a state machine. It has only a few states, none of which have any associated data, so it uses its configuration (delimiter character, quote character, etc) to populate a big table of what to do in every possible combination of state and input byte.
In theory, that is very fast.
I wonder…would it be faster still, if the state machine was generated at compile time by a proc macro?