We can make the pattern matching when expressions in Aiken both more efficient and simpler in codegen. Instead of processing a TypedExpr of cases and nested cases. We instead build up a decision tree and use that to produce the Air op codes to carry out the pattern matching. Which enables a large simplification to the existing op codes today.
Using the algorithm from this paper https://www.cs.tufts.edu/comp/150FP/archive/luc-maranget/jun08.pdf
We can make the pattern matching when expressions in Aiken both more efficient and simpler in codegen. Instead of processing a TypedExpr of cases and nested cases. We instead build up a decision tree and use that to produce the Air op codes to carry out the pattern matching. Which enables a large simplification to the existing op codes today.
For another in depth explanation and implementation of the algorithm described above. Look here https://github.com/clojure/core.match/wiki/Understanding-the-algorithm