Based on the latest flame-graph, we are spending notable time doing drop_in_place of the iterators of IncrementalJoin::eval.
At first, I thought this was because we were cloning and dropping 4x the SmallVec, but as these are inline and not heap allocated, that seems unlikely. So this PR tries to clarify in code that this isn't the case by using ArrayVec and borrows. Moreover, all the dropping work of the hash map is moved outside the rayon parallel iteration. Also, this makes the benchmarks slightly more accurate as they now do not clone-allocate + drop in place.
Description of Changes
Based on the latest flame-graph, we are spending notable time doing
drop_in_place
of the iterators ofIncrementalJoin::eval
. At first, I thought this was because we were cloning and dropping 4x theSmallVec
, but as these are inline and not heap allocated, that seems unlikely. So this PR tries to clarify in code that this isn't the case by usingArrayVec
and borrows. Moreover, all the dropping work of the hash map is moved outside the rayon parallel iteration. Also, this makes the benchmarks slightly more accurate as they now do not clone-allocate + drop in place.API and ABI breaking changes
None
Expected complexity level and risk
1