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

Function BM_PlainDecodingDouble

cpp/src/parquet/encoding_benchmark.cc:172–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170BENCHMARK(BM_PlainEncodingDoubleNaN)->Range(MIN_RANGE, MAX_RANGE);
171
172static void BM_PlainDecodingDouble(benchmark::State& state) {
173 std::vector<double> values(state.range(0), 64.0);
174 auto encoder = MakeTypedEncoder<DoubleType>(Encoding::PLAIN);
175 encoder->Put(values.data(), static_cast<int>(values.size()));
176 std::shared_ptr<Buffer> buf = encoder->FlushValues();
177
178 for (auto _ : state) {
179 auto decoder = MakeTypedDecoder<DoubleType>(Encoding::PLAIN);
180 decoder->SetData(static_cast<int>(values.size()), buf->data(),
181 static_cast<int>(buf->size()));
182 decoder->Decode(values.data(), static_cast<int>(values.size()));
183 }
184 state.SetBytesProcessed(state.iterations() * state.range(0) * sizeof(double));
185}
186
187BENCHMARK(BM_PlainDecodingDouble)->Range(MIN_RANGE, MAX_RANGE);
188

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected