File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ name = "occupancy"
6464harness = false
6565
6666[[bench ]]
67- name = " gc_view_types "
67+ name = " view_types "
6868harness = false
6969
7070[[bench ]]
Original file line number Diff line number Diff line change 1717
1818use arrow_array:: StringViewArray ;
1919use criterion:: * ;
20- use std:: hint;
2120
2221fn gen_view_array ( size : usize ) -> StringViewArray {
2322 StringViewArray :: from_iter ( ( 0 ..size) . map ( |v| match v % 3 {
@@ -33,14 +32,20 @@ fn criterion_benchmark(c: &mut Criterion) {
3332
3433 c. bench_function ( "gc view types all" , |b| {
3534 b. iter ( || {
36- hint :: black_box ( array. gc ( ) ) ;
35+ black_box ( array. gc ( ) ) ;
3736 } ) ;
3837 } ) ;
3938
4039 let sliced = array. slice ( 0 , 100_000 / 2 ) ;
4140 c. bench_function ( "gc view types slice half" , |b| {
4241 b. iter ( || {
43- hint:: black_box ( sliced. gc ( ) ) ;
42+ black_box ( sliced. gc ( ) ) ;
43+ } ) ;
44+ } ) ;
45+
46+ c. bench_function ( "view types slice" , |b| {
47+ b. iter ( || {
48+ black_box ( array. slice ( 0 , 100_000 / 2 ) ) ;
4449 } ) ;
4550 } ) ;
4651}
You can’t perform that action at this time.
0 commit comments