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

Function from_slice

arrow/benches/buffer_create.rs:102–110  ·  view source on GitHub ↗
(data: &[Vec<u32>], capacity: usize)

Source from the content-addressed store, hash-verified

100}
101
102fn from_slice(data: &[Vec<u32>], capacity: usize) -> Buffer {
103 hint::black_box({
104 let mut a = Vec::<u32>::with_capacity(capacity);
105
106 data.iter().for_each(|vec| a.extend(vec));
107
108 Buffer::from(a.to_byte_slice())
109 })
110}
111
112fn create_data(size: usize) -> Vec<Vec<u32>> {
113 let rng = &mut seedable_rng();

Callers 15

benchmarkFunction · 0.85
schemaMethod · 0.85
test_headerFunction · 0.85
encodeMethod · 0.85
typed_value_to_variantFunction · 0.85
decode_fixedFunction · 0.85
assert_json_eqFunction · 0.85
assert_binary_jsonFunction · 0.85

Calls 3

to_byte_sliceMethod · 0.80
iterMethod · 0.45
extendMethod · 0.45