This is an automated email from the ASF dual-hosted git repository.

tustvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/master by this push:
     new 994be0589 Benchmark with prepared row converter (#2930)
994be0589 is described below

commit 994be0589c88fa5137e8db7302e51f9b5a1bc2c2
Author: Raphael Taylor-Davies <1781103+tustv...@users.noreply.github.com>
AuthorDate: Thu Oct 27 11:25:09 2022 +1300

    Benchmark with prepared row converter (#2930)
    
    * Benchmark with prepared row converter
    
    * Update arrow/benches/row_format.rs
    
    Co-authored-by: Andrew Lamb <and...@nerdnetworks.org>
    
    Co-authored-by: Andrew Lamb <and...@nerdnetworks.org>
---
 arrow/benches/row_format.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arrow/benches/row_format.rs b/arrow/benches/row_format.rs
index ff505781a..48bb01311 100644
--- a/arrow/benches/row_format.rs
+++ b/arrow/benches/row_format.rs
@@ -45,6 +45,10 @@ fn do_bench(c: &mut Criterion, name: &str, cols: 
Vec<ArrayRef>) {
 
     let mut converter = RowConverter::new(fields);
     let rows = converter.convert_columns(&cols).unwrap();
+    // using a pre-prepared row converter should be faster than the first time
+    c.bench_function(&format!("convert_columns_prepared {}", name), |b| {
+        b.iter(|| black_box(converter.convert_columns(&cols).unwrap()));
+    });
 
     c.bench_function(&format!("convert_rows {}", name), |b| {
         b.iter(|| black_box(converter.convert_rows(&rows).unwrap()));

Reply via email to