Open st1page opened 7 months ago
Some benchmark results:
less_than(bigint, int)
on 2 int arrays with 1024 elements and outputting the result as a boolean array is 138ns.less_than(bigint, int)
on a data chunk with 1024 rows is 378ns.Some explanations:
Bitmap::from_iter
takes a majority overhead in the flamegraph is that it includes function evaluation.Vec<bool>
in Bitmap::from_iter
is that both steps can utilize auto-vectorization. But collecting bools directly into a bitmap does not have a fast way as far as I know.Conclusions:
TrustedLen
.less_than(bigint, int)
function is not optimal, but also not too bad (compared with other functions which can not utilize SIMD). The potential optimization is no more than 3x faster (378 -> 138ns). I think it's not a big bottleneck of the query.This issue has been open for 60 days with no activity. Could you please update the status? Feel free to continue discussion or close as not planned.
https://github.com/risingwavelabs/risingwave/blob/d4629c3fde1b3da8cfef91304913177ef63e1ad8/src/common/src/buffer/bitmap.rs#L597-L602