purescript-backend-optimizer
purescript-backend-optimizer copied to clipboard
Generated code for case match on instances are heaavy
That isn't surprising to me. Any translation of a DAG (pattern matching) to trees (if/else) has the potential for exponential blowup. The chances of this happening increase with the size and complexity of the pattern matrix. For something like this, I would potentially rewrite this with guards to avoid the blowup, since you don't need to exhaustively enumerate your patterns.