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

Pattern matching API / DSL for rewrite rules #20

Open
dubiousconst282 opened this issue Mar 8, 2023 · 0 comments
Open

Pattern matching API / DSL for rewrite rules #20

dubiousconst282 opened this issue Mar 8, 2023 · 0 comments

Comments

@dubiousconst282
Copy link
Owner

If we decide to apply simple pattern based rewrites, we'll need a proper matching API since C#'s is not very scalable.

An API like LLVM's would be nice and it's possible but it may come at a cost, depending on how it is implemented:

  • Relying on generics may bloat the binary and runtime structures with useless generic instantiations
  • Relying on plain interfaces may be slow because JIT sucks at devirtualizing even in trivial cases

It may be worth considering an extension-based approach instead, see https://www.reddit.com/r/csharp/comments/83ep10/comment/dvhdjss

Other:

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

1 participant