HaoYang670 commented on PR #2127:
URL: https://github.com/apache/arrow-rs/pull/2127#issuecomment-1193121071

   After doing lots of bench tests today, I found that the performance 
regression of `bench_bool` is really weird. It is caused by value builder, but 
not the null buffer builder. I have tried to remove the impact of the null 
buffer builder:
   ```rust
       /// Appends a slice of type `T` into the builder
       #[inline]
       pub fn append_slice(&mut self, v: &[bool]) {
           //self.null_buffer_builder.append_n_true(v.len());
           self.values_builder.append_slice(v);
       }
   ```
   and run `cargo bench --bench builder -- --baseline master `,
   but still got the weird result: (Tested on Intel Ubuntu) 
   ```
   bench_bool/bench_bool   time:   [560.89 us 561.72 us 562.61 us]              
                    
                           thrpt:  [888.71 MiB/s 890.13 MiB/s 891.44 MiB/s]
                    change:
                           time:   [+116.82% +117.38% +117.92%] (p = 0.00 < 
0.05)
                           thrpt:  [-54.113% -53.997% -53.879%]
                           Performance has regressed.
   Found 4 outliers among 100 measurements (4.00%)
     1 (1.00%) low severe
     1 (1.00%) low mild
     2 (2.00%) high mild
   ```
   
   I have also tried to `inline(always)` the 
`BooleanBufferBuilder::append_slice` but it had no effect.
   cc @tustvold @viirya @alamb  could you reproduce the above result? And any 
idea about it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to