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

Function FloatFormatting

cpp/src/arrow/util/value_parsing_benchmark.cc:249–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247
248template <typename ARROW_TYPE, typename C_TYPE = typename ARROW_TYPE::c_type>
249static void FloatFormatting(benchmark::State& state) { // NOLINT non-const reference
250 std::vector<C_TYPE> values = MakeFloats<C_TYPE>(1000);
251 StringFormatter<ARROW_TYPE> formatter;
252
253 while (state.KeepRunning()) {
254 DummyAppender appender;
255 for (const auto value : values) {
256 ABORT_NOT_OK(formatter(value, appender));
257 }
258 benchmark::DoNotOptimize(appender.total_);
259 }
260 state.SetItemsProcessed(state.iterations() * values.size());
261}
262
263BENCHMARK_TEMPLATE(IntegerParsing, Int8Type);
264BENCHMARK_TEMPLATE(IntegerParsing, Int16Type);

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected