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

Function BM_DeltaBitPackingDecode

cpp/src/parquet/encoding_benchmark.cc:732–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

730
731template <typename DType, typename NumberGenerator>
732static void BM_DeltaBitPackingDecode(benchmark::State& state, NumberGenerator gen) {
733 using T = typename DType::c_type;
734 std::vector<T> values = gen(state.range(0));
735 auto encoder = MakeTypedEncoder<DType>(Encoding::DELTA_BINARY_PACKED);
736 encoder->Put(values.data(), static_cast<int>(values.size()));
737 std::shared_ptr<Buffer> buf = encoder->FlushValues();
738
739 auto decoder = MakeTypedDecoder<DType>(Encoding::DELTA_BINARY_PACKED);
740 for (auto _ : state) {
741 decoder->SetData(static_cast<int>(values.size()), buf->data(),
742 static_cast<int>(buf->size()));
743 decoder->Decode(values.data(), static_cast<int>(values.size()));
744 }
745 state.SetBytesProcessed(state.iterations() * state.range(0) * sizeof(T));
746 state.SetItemsProcessed(state.iterations() * state.range(0));
747}
748
749static void BM_DeltaBitPackingDecode_Int32_Fixed(benchmark::State& state) {
750 BM_DeltaBitPackingDecode<Int32Type>(state, MakeDeltaBitPackingInputFixed<Int32Type>);

Callers

nothing calls this directly

Calls 7

genFunction · 0.50
PutMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
FlushValuesMethod · 0.45
SetDataMethod · 0.45
DecodeMethod · 0.45

Tested by

no test coverage detected