Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions arrow/benches/cast_kernels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ fn add_benchmark(c: &mut Criterion) {
let i64_array = build_array::<Int64Type>(512);
let f32_array = build_array::<Float32Type>(512);
let f32_utf8_array = cast(&build_array::<Float32Type>(512), &DataType::Utf8).unwrap();
let i32_utf8_array = cast(&build_array::<Int32Type>(512), &DataType::Utf8).unwrap();

let f64_array = build_array::<Float64Type>(512);
let date64_array = build_array::<Date64Type>(512);
Expand Down Expand Up @@ -300,6 +301,9 @@ fn add_benchmark(c: &mut Criterion) {
c.bench_function("cast utf8 to f32", |b| {
b.iter(|| cast_array(&f32_utf8_array, DataType::Float32))
});
c.bench_function("cast utf8 to i32", |b| {
b.iter(|| cast_array(&i32_utf8_array, DataType::Int32))
});
c.bench_function("cast i64 to string 512", |b| {
b.iter(|| cast_array(&i64_array, DataType::Utf8))
});
Expand Down
Loading