Generating optimized chained subparts #138
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Close #137
I did some exploring around the chained subparts issue. There are a few design decisions/ features that came up that are worth exploring:
@generate
-ing the chained subparts function.dom
andcodom
pair. It would be something of a mini-feature to return all mismatched pairs instead of just the first one found.(:src,)
syntax, and never validating when given aVal((:src,))
. It would be nice to split the difference by only checking this at compile time, and guaranteeing that only valid chained subparts functions are generated. I'm not sure if the original CompTime implementation was supposed to guarantee this or not.With the way that this function is written, the
Expr
for a chained subparts function is returned. This has higher overhead of course that the expression that is just built up from a nativefoldl
. I can add this feature in before this PR would be merged.This PR unfortunately did away with the use of CompTime.jl. I believe that this library could assist with points 3 and 4, but I am not sure how to go about doing that at this moment.