proxygen
|
#include <algorithm>
#include <map>
#include <folly/Benchmark.h>
#include <folly/Random.h>
#include <folly/container/Enumerate.h>
#include <folly/container/Foreach.h>
#include <folly/init/Init.h>
Go to the source code of this file.
Functions | |
void | setupBenchmark (size_t iters) |
void | setupCharVecBenchmark (size_t iters) |
BENCHMARK (ForEachFunctionNoAssign, iters) | |
BENCHMARK (StdForEachFunctionNoAssign, iters) | |
BENCHMARK (RangeBasedForLoopNoAssign, iters) | |
BENCHMARK (ManualLoopNoAssign, iters) | |
BENCHMARK (ForEachFunctionAssign, iters) | |
BENCHMARK (StdForEachFunctionAssign, iters) | |
BENCHMARK (RangeBasedForLoopAssign, iters) | |
BENCHMARK (ManualLoopAssign, iters) | |
BENCHMARK (ForEachFunctionNoAssignWithIndexManipulation, iters) | |
BENCHMARK (StdForEachFunctionNoAssignWithIndexManipulation, iters) | |
BENCHMARK (RangeBasedForLoopNoAssignWithIndexManipulation, iters) | |
BENCHMARK (ForEachFunctionFetch, iters) | |
BENCHMARK (StdForEachFunctionFetch, iters) | |
BENCHMARK (ForLoopFetch, iters) | |
BENCHMARK (ForEachKVNoMacroAssign, iters) | |
BENCHMARK (ForEachKVNoMacroNoAssign, iters) | |
BENCHMARK (ForEachKVMacro, iters) | |
BENCHMARK (ForEachManual, iters) | |
BENCHMARK (ForEachRange, iters) | |
BENCHMARK (ForEachDescendingManual, iters) | |
BENCHMARK (ForEachRangeR, iters) | |
BENCHMARK (CharVecForRange, iters) | |
BENCHMARK (CharVecForRangeExplicitIndex, iters) | |
BENCHMARK (CharVecForEach, iters) | |
BENCHMARK (CharVecForEachIndex, iters) | |
BENCHMARK (CharVecForRangeEnumerate, iters) | |
int | main (int argc, char **argv) |
Variables | |
std::map< int, std::string > | bmMap |
std::vector< int > | vec_one |
std::vector< int > | vec_two |
std::vector< char > | vec_char |
BENCHMARK | ( | ForEachFunctionNoAssign | , |
iters | |||
) |
Definition at line 62 of file ForeachBenchmark.cpp.
References folly::BenchmarkSuspender::dismissing(), folly::doNotOptimizeAway(), folly::for_each(), setupBenchmark(), and string.
BENCHMARK | ( | StdForEachFunctionNoAssign | , |
iters | |||
) |
Definition at line 78 of file ForeachBenchmark.cpp.
References folly::BenchmarkSuspender::dismissing(), folly::doNotOptimizeAway(), for_each(), setupBenchmark(), and string.
BENCHMARK | ( | RangeBasedForLoopNoAssign | , |
iters | |||
) |
Definition at line 94 of file ForeachBenchmark.cpp.
References folly::BenchmarkSuspender::dismissing(), folly::doNotOptimizeAway(), setupBenchmark(), and string.
BENCHMARK | ( | ManualLoopNoAssign | , |
iters | |||
) |
Definition at line 109 of file ForeachBenchmark.cpp.
References folly::BenchmarkSuspender::dismissing(), folly::doNotOptimizeAway(), setupBenchmark(), and string.
BENCHMARK | ( | ForEachFunctionAssign | , |
iters | |||
) |
Definition at line 125 of file ForeachBenchmark.cpp.
References folly::BenchmarkSuspender::dismissing(), folly::for_each(), k, setupBenchmark(), string, and v.
BENCHMARK | ( | StdForEachFunctionAssign | , |
iters | |||
) |
Definition at line 142 of file ForeachBenchmark.cpp.
References folly::BenchmarkSuspender::dismissing(), for_each(), k, setupBenchmark(), string, and v.
BENCHMARK | ( | RangeBasedForLoopAssign | , |
iters | |||
) |
Definition at line 159 of file ForeachBenchmark.cpp.
References folly::BenchmarkSuspender::dismissing(), k, setupBenchmark(), string, and v.
BENCHMARK | ( | ManualLoopAssign | , |
iters | |||
) |
Definition at line 176 of file ForeachBenchmark.cpp.
References folly::BenchmarkSuspender::dismissing(), k, setupBenchmark(), string, and v.
BENCHMARK | ( | ForEachFunctionNoAssignWithIndexManipulation | , |
iters | |||
) |
Definition at line 193 of file ForeachBenchmark.cpp.
References folly::BenchmarkSuspender::dismissing(), folly::for_each(), setupBenchmark(), and string.
BENCHMARK | ( | StdForEachFunctionNoAssignWithIndexManipulation | , |
iters | |||
) |
Definition at line 209 of file ForeachBenchmark.cpp.
References folly::BenchmarkSuspender::dismissing(), for_each(), setupBenchmark(), and string.
BENCHMARK | ( | RangeBasedForLoopNoAssignWithIndexManipulation | , |
iters | |||
) |
Definition at line 227 of file ForeachBenchmark.cpp.
References folly::BenchmarkSuspender::dismissing(), setupBenchmark(), and string.
BENCHMARK | ( | ForEachFunctionFetch | , |
iters | |||
) |
Definition at line 244 of file ForeachBenchmark.cpp.
References folly::BenchmarkSuspender::dismissing(), folly::fetch(), folly::for_each(), and setupBenchmark().
BENCHMARK | ( | StdForEachFunctionFetch | , |
iters | |||
) |
Definition at line 255 of file ForeachBenchmark.cpp.
References folly::BenchmarkSuspender::dismissing(), for_each(), and setupBenchmark().
BENCHMARK | ( | ForLoopFetch | , |
iters | |||
) |
Definition at line 267 of file ForeachBenchmark.cpp.
References folly::BenchmarkSuspender::dismissing(), and setupBenchmark().
BENCHMARK | ( | ForEachKVNoMacroAssign | , |
iters | |||
) |
Definition at line 279 of file ForeachBenchmark.cpp.
References BENCHMARK_SUSPEND, FOR_EACH, k, setupBenchmark(), string, and v.
BENCHMARK | ( | ForEachKVNoMacroNoAssign | , |
iters | |||
) |
Definition at line 295 of file ForeachBenchmark.cpp.
References BENCHMARK_SUSPEND, FOR_EACH, setupBenchmark(), and string.
BENCHMARK | ( | ForEachKVMacro | , |
iters | |||
) |
Definition at line 309 of file ForeachBenchmark.cpp.
References BENCHMARK_SUSPEND, FOR_EACH_KV, k, setupBenchmark(), string, and v.
BENCHMARK | ( | ForEachManual | , |
iters | |||
) |
Definition at line 323 of file ForeachBenchmark.cpp.
References folly::doNotOptimizeAway(), i, and sum().
BENCHMARK | ( | ForEachRange | , |
iters | |||
) |
Definition at line 331 of file ForeachBenchmark.cpp.
References folly::doNotOptimizeAway(), FOR_EACH_RANGE, i, and sum().
BENCHMARK | ( | ForEachDescendingManual | , |
iters | |||
) |
Definition at line 337 of file ForeachBenchmark.cpp.
References folly::doNotOptimizeAway(), i, and sum().
BENCHMARK | ( | ForEachRangeR | , |
iters | |||
) |
Definition at line 345 of file ForeachBenchmark.cpp.
References folly::doNotOptimizeAway(), FOR_EACH_RANGE_R, i, and sum().
BENCHMARK | ( | CharVecForRange | , |
iters | |||
) |
Definition at line 351 of file ForeachBenchmark.cpp.
References BENCHMARK_SUSPEND, c, folly::doNotOptimizeAway(), setupCharVecBenchmark(), and sum().
BENCHMARK | ( | CharVecForRangeExplicitIndex | , |
iters | |||
) |
Definition at line 362 of file ForeachBenchmark.cpp.
References BENCHMARK_SUSPEND, c, folly::doNotOptimizeAway(), setupCharVecBenchmark(), and sum().
BENCHMARK | ( | CharVecForEach | , |
iters | |||
) |
Definition at line 375 of file ForeachBenchmark.cpp.
References BENCHMARK_SUSPEND, c, folly::doNotOptimizeAway(), folly::for_each(), setupCharVecBenchmark(), and sum().
BENCHMARK | ( | CharVecForEachIndex | , |
iters | |||
) |
Definition at line 384 of file ForeachBenchmark.cpp.
References BENCHMARK_SUSPEND, c, folly::doNotOptimizeAway(), folly::for_each(), setupCharVecBenchmark(), and sum().
BENCHMARK | ( | CharVecForRangeEnumerate | , |
iters | |||
) |
Definition at line 393 of file ForeachBenchmark.cpp.
References BENCHMARK_SUSPEND, folly::doNotOptimizeAway(), folly::enumerate(), setupCharVecBenchmark(), and sum().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 404 of file ForeachBenchmark.cpp.
References folly::init(), and folly::runBenchmarks().
void setupBenchmark | ( | size_t | iters | ) |
void setupCharVecBenchmark | ( | size_t | iters | ) |
Definition at line 56 of file ForeachBenchmark.cpp.
References folly::Random::rand32().
Referenced by BENCHMARK().
std::map<int, std::string> bmMap |
Definition at line 37 of file ForeachBenchmark.cpp.
std::vector<char> vec_char |
Definition at line 42 of file ForeachBenchmark.cpp.
std::vector<int> vec_one |
Definition at line 38 of file ForeachBenchmark.cpp.
std::vector<int> vec_two |
Definition at line 39 of file ForeachBenchmark.cpp.