MCPcopy Create free account
hub / github.com/apache/arrow / BM_ByteStreamSplitEncode

Function BM_ByteStreamSplitEncode

cpp/src/parquet/encoding_benchmark.cc:425–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423
424template <typename T, typename EncodeFunc>
425static void BM_ByteStreamSplitEncode(benchmark::State& state, EncodeFunc&& encode_func) {
426 const std::vector<T> values(state.range(0), ByteStreamSplitDummyValue<T>::value());
427 const uint8_t* values_raw = reinterpret_cast<const uint8_t*>(values.data());
428 std::vector<uint8_t> output(state.range(0) * sizeof(T));
429
430 for (auto _ : state) {
431 encode_func(values_raw, /*width=*/static_cast<int>(sizeof(T)), values.size(),
432 output.data());
433 benchmark::ClobberMemory();
434 }
435 state.SetBytesProcessed(state.iterations() * values.size() * sizeof(T));
436 state.SetItemsProcessed(state.iterations() * values.size());
437}
438
439static void BM_ByteStreamSplitDecode_Float_Generic(benchmark::State& state) {
440 BM_ByteStreamSplitDecode<float>(state, ::arrow::util::internal::ByteStreamSplitDecode);

Callers

nothing calls this directly

Calls 3

valueFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected