risingwavelabs / risingwave

Best-in-class stream processing, analytics, and management. Perform continuous analytics, or build event-driven applications, real-time ETL pipelines, and feature stores in minutes. Unified streaming and batch. PostgreSQL compatible.
https://go.risingwave.com/slack
Apache License 2.0
6.88k stars 569 forks source link

perf: use `bitmap::iter_ones()` instead of `bitmap::iter()` #15726

Open st1page opened 6 months ago

st1page commented 6 months ago

We have many logic like this

for ((a, b), vis) in aaa.iter()
.zip_eq(bbb.iter())
.zip_eq(chunk.visibility().iter()) {
   if !vis {
     continue
   }
   // do something
}

Use bitmap::iter_ones() can optimize the performance by skipping the invisible rows with SIMD bit operation https://github.com/risingwavelabs/risingwave/pull/9278, especially when the selectivity visibility bitmap is low.

An example is https://github.com/risingwavelabs/risingwave/pull/9329

github-actions[bot] commented 3 months ago

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.