Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated code for case match on instances are heaavy #113

Open
imsaravana369 opened this issue Jan 3, 2025 · 1 comment
Open

Generated code for case match on instances are heaavy #113

imsaravana369 opened this issue Jan 3, 2025 · 1 comment

Comments

@imsaravana369
Copy link

For this code

The code generated by purescript-optimized backed is more than 17K+ line

@natefaubion
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants