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

Function std_copy_converting

cpp/src/arrow/util/range_benchmark.cc:68–77  ·  view source on GitHub ↗

For comparison: pure copy with type conversion.

Source from the content-addressed store, hash-verified

66
67// For comparison: pure copy with type conversion.
68void std_copy_converting(benchmark::State& state) {
69 auto source = generate_junk<int32_t>(kSize);
70 // bigger type to avoid warnings
71 std::vector<int64_t> target(kSize);
72
73 for (auto _ : state) {
74 std::copy(source.begin(), source.end(), target.begin());
75 }
76 state.SetItemsProcessed(state.iterations() * kSize);
77}
78
79BENCHMARK(std_copy_converting);
80

Callers

nothing calls this directly

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected