-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Aiken UPLC Optimization overhaul #1052
base: main
Are you sure you want to change the base?
Conversation
…e swept up by the builtin force reduction
old
|
new
|
Slight regression with some fold functions. Going to look into that tomorrow. Overall some improvements though. |
… forward pass being able to apply an argument that may have no_inline at the top where as vice-versa would reduce the arg first.
Much better
|
loop { | ||
let (current_program, context) = prog.multi_pass(); | ||
|
||
if context.node_count == prev_count { | ||
prog = current_program; | ||
break; | ||
} else { | ||
prog = current_program; | ||
prev_count = context.node_count; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this guaranteed to always converge to a fixed point though? I could imagine infinite cycles with an optimization pass adding some nodes, and the next one removing them. So we might need to track not the previous count, but the min(all previous counts)
.
Refactor and structure optimizations to be less computationally heavy.
So instead of one pass one optimization. We finally do one pass several optimizations. There are still some optimizations that need an independent pass like the curry optimization since it actually does 2 passes. We also separate out optimizations that only need a single pass.
Now to make sure we beat all the benchmarks.