MCPcopy Create free account
hub / github.com/apache/arrow-rs / array_string_from_vec

Function array_string_from_vec

arrow/benches/array_from.rs:35–45  ·  view source on GitHub ↗
(n: usize)

Source from the content-addressed store, hash-verified

33}
34
35fn array_string_from_vec(n: usize) {
36 let mut v: Vec<Option<&str>> = Vec::with_capacity(n);
37 for i in 0..n {
38 if i % 2 == 0 {
39 v.push(Some("hello world"));
40 } else {
41 v.push(None);
42 }
43 }
44 hint::black_box(StringArray::from(v));
45}
46
47fn struct_array_values(
48 n: usize,

Callers 1

array_from_vec_benchmarkFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected