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

Function IntegerFormatting

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

Source from the content-addressed store, hash-verified

232
233template <typename ARROW_TYPE, typename C_TYPE = typename ARROW_TYPE::c_type>
234static void IntegerFormatting(benchmark::State& state) { // NOLINT non-const reference
235 std::vector<C_TYPE> values = MakeInts<C_TYPE>(1000);
236 StringFormatter<ARROW_TYPE> formatter;
237
238 while (state.KeepRunning()) {
239 DummyAppender appender;
240 for (const auto value : values) {
241 ABORT_NOT_OK(formatter(value, appender));
242 }
243 benchmark::DoNotOptimize(appender.total_);
244 }
245 state.SetItemsProcessed(state.iterations() * values.size());
246}
247
248template <typename ARROW_TYPE, typename C_TYPE = typename ARROW_TYPE::c_type>
249static void FloatFormatting(benchmark::State& state) { // NOLINT non-const reference

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected