cpp/src/arrow/util/range_benchmark.cc
// std::copy with a lazy range as a source
:copy with a lazy range as a source
: copy with a lazy range as a source
void lazy_copy(benchmark::State& state) {
  auto source = generate_junk(kSize);
  std::vector<int> target(kSize);
  auto lazy_range = internal::MakeLazyRange(
      [&source](int64_t index) { return source[index]; }, source.size());
  for (auto _ : state) {
    std::copy(lazy_range.begin(), lazy_range.end(), target.begin());
  }
}
void lazy_copy ( benchmark :: State & state ) { auto source = generate_junk ( kSize ) ; std :: vector < int > target ( kSize ) ; auto lazy_range = internal :: MakeLazyRange ( [ & source ] ( int64_t index ) { return source [ index ] ; } , source . size ( ) ) ; for ( auto _ : state ) { std :: copy ( lazy_range . begin ( ) , lazy_range . end ( ) , target . begin ( ) ) ; } }
std::copy with a lazy range as a source
std :: copy with a lazy range as a source