Compiling Match Statements to Bytecode
xnacly.me
xnacly.me
https://simon.peytonjones.org/assets/pdfs/slpj-book-1987-2up...
It explains how to minimize the decisions trees you obtain from a match statement, so you gain a ton of efficiency over a naive implementation, especially for large, multi-column matches.
Optimizing well-known jumps is useful, as is branch reordering, but the tombstone flag is unnecessary; you can simply write down a list of all targeted / called blocks and perform dead block elimination more generally that way.