tustvold commented on code in PR #2495:
URL: https://github.com/apache/arrow-rs/pull/2495#discussion_r948941479


##########
arrow/benches/array_from_vec.rs:
##########
@@ -119,9 +111,20 @@ fn decimal_benchmark(c: &mut Criterion) {
         b.iter(|| decimal128_array_from_vec(array.as_slice()))
     });
 
+    // bench decimal256array
+    // create option<into<decimal256>> array
+    let size = 1 << 10;
+    let mut array = vec![];
+    let mut rng = rand::thread_rng();
+    for _ in 0..size {
+        let decimal =
+            Decimal256::from(BigInt::from(rng.gen_range::<i128, 
_>(0..9999999999999)));
+        array.push(Some(decimal));
+    }
+
     // bench decimal256 array
     c.bench_function("decimal256_array_from_vec 32768", |b| {
-        b.iter(|| decimal256_array_from_vec)
+        b.iter(|| decimal256_array_from_vec(array.as_slice()))

Review Comment:
   This is now more realistic as it is no longer benchmarking the decimal 
assembly code



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to