Decided to check C# (it also emits a Trie for pattern matches like that) - it turned out it needed a little help on the Roslyn side for this case, filed github.com/dotnet/roslyn/… 🙃
This is by the way one of the reasons why the code you write in C without thinking going to be slower than rust:



