Repository navigation
Inlining expressions #561
nielstron
started this conversation in
Ideas / Improvements
Replies: 0 comments
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.
Inlining expressions should be implemented. The main reason is that it makes more readable code more efficient. For example the following
will now be computationally as cheap as the spaghetti-ized version
The optimization should by default only applied to variables that are read once. In the case of reading and writing exactly once, this optimization will alway lead to less CPU/Mem steps and smaller script size. When applying the optimization to values read more than once, it may lead to a tradeoff of less steps but larger size (depending on the size of the expression that needs to be re-computed it might also increase the steps)
A draft implementation is in
feat/inline_single_defsAll reactions