optimize queue-msg normalization pass
Closed this issue · 0 comments
benluelo commented
the normalization pass for queue-msg
is quite inefficient. since this function is called on every message pushed into the queue, and on the output of every optimization pass, this needs to be optimized. it was copied from the previous implementation which had each step as a separate pass, but it can now be consolidated into one:
the main two inefficiencies are:
- allocates new
Vec
s for every step for both the parent id indexes and outputOp
s - descends into the
Op
s multiple times
fixing these will essentially require a bottom-up rewrite of the normalization pass.
requirements:
- all existing (non-commented-out) tests must still pass
- if a semantic bug in one of these tests is found, then keep that test as a failure case and write a new test for the correct semantics.
- benchmarks for comparison with current and new
Note
i've marked this as E-easy since this is a very isolated component. i am willing to provide mentoring on this task if desired.