Repository navigation
Replies: 1 comment
|
It's possible to scale to larger programs, but it will take work. This
technique is very sensitive to the rewrites that you are using; for
example, associativity and commutativity are known to grow the size of the
e-graph rapidly. You will also probably have to do things like use a rule
scheduler, or manage e-graph size by extracting and re-optimizing a term.
…On Tue, Sep 26, 2023 at 8:11 AM Mario Montoya ***@***.***> wrote:
I'm exploring using this library for a full language that embeds a query
(think PSQL), so I have 2 distinct use cases:
- The user sends a SQL query that I compile to my AST, here I apply a
query optimizer
- The user write a full app backend, like the one you make in C# +
LINQ, so here also is a compiler optimizer, so this is a relatively "big"
program with dozens of files or more
So, is desirable that I can resolve very fast the first case, and have a
good compiler speed in the second.
I'm ok having restrictions, the lang is in developing so I'm free to
change it so it become easy to optimize.
In specific, I wanna optimize things like:
- Basic query optimizations like in
https://rustmagazine.org/issue-2/write-a-sql-optimizer-using-egg/
- For loop rewrites of the one you see in Rust + Iterators
- Array operations like [1, 2] + 1
- Basic compiler optimization like constant folding, constant rewrite,
etc
—
Reply to this email directly, view it on GitHub
<#273>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANTPTDOGVUM5QMN5H5VMVLX4LWB5ANCNFSM6AAAAAA5H4ROXY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm exploring using this library for a full language that embeds a query (think PSQL), so I have 2 distinct use cases:
SQLquery that I compile to my AST, here I apply a query optimizerSo, is desirable that I can resolve very fast the first case, and have a good compiler speed in the second.
I'm ok having restrictions, the lang is in developing so I'm free to change it so it become easy to optimize.
In specific, I wanna optimize things like:
[1, 2] + 1All reactions