Mola-maker commented on code in PR #12353:
URL: https://github.com/apache/arrow-rs/pull/12353#discussion_r4639154646


##########
arrow-array/benches/builder_finish.rs:
##########
@@ -0,0 +1,187 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: See the NOTICE file distributed with this work for 
additional information regarding copyright ownership
+// SPDX-FileContributor: Licensed to the Apache Software Foundation (ASF) 
under one or more contributor license agreements
+
+//! Overhead of `finish` for builders that used to route through `ArrayData`.
+//!
+//! Covers the builders moved off `ArrayData` by #12228 (`primitive`,
+//! `boolean`, `byte`, `fixed_size_binary`) and by this follow-up (`null`,
+//! `map`, and the three dictionary builders). `UnionBuilder` still routes
+//! through `ArrayDataBuilder` and is not covered.
+
+use arrow_array::Array;
+use arrow_array::builder::{
+    BooleanBuilder, FixedSizeBinaryBuilder, FixedSizeBinaryDictionaryBuilder,
+    GenericByteDictionaryBuilder, Int32Builder, MapBuilder, NullBuilder, 
PrimitiveBuilder,
+    PrimitiveDictionaryBuilder, StringBuilder,
+};
+use arrow_array::types::{Int8Type, Int32Type, UInt32Type, Utf8Type};
+use criterion::{Criterion, criterion_group, criterion_main};
+use std::hint::black_box;
+
+/// Sizes chosen so the fixed cost of `finish` dominates, mirroring the
+/// microbenchmark in #11717.

Review Comment:
   +1



-- 
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