Commit e56b41ec authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by facebook-github-bot-9

Style nits for folly/test/FingerprintBenchmark.cpp

Summary: [Folly] Style nits for `folly/test/FingerprintBenchmark.cpp`.

Reviewed By: Gownta

Differential Revision: D2579463

fb-gh-sync-id: 135bc3ef43708cb024f78c59672811159d2163e0
parent 22f86ef7
...@@ -124,25 +124,24 @@ void fastFingerprintTerms128(int num_iterations, int num_ids) { ...@@ -124,25 +124,24 @@ void fastFingerprintTerms128(int num_iterations, int num_ids) {
// the benchmark without providing any useful data. // the benchmark without providing any useful data.
int main(int argc, char** argv) { int main(int argc, char** argv) {
initialize(); # define BM(name, min, max) \
# define BM(name, min, max) \ for (size_t i = min; i <= max; i *= 2) { \
for (size_t i = min; i <= max; i *= 2) { \ addBenchmark( \
addBenchmark( \ __FILE__, \
__FILE__, \ sformat("{}_{}", #name, i).c_str(), \
sformat("{}_{}", #name, i).c_str(), \ [=](int iters) { name(iters, i); return iters; }); \
[=](int iters) { name(iters, i); return iters; }); \ }
} BM(fastFingerprintIds64, 1, kMaxIds)
BM(slowFingerprintIds64, 1, kMaxIds)
BM(fastFingerprintIds96, 1, kMaxIds)
BM(fastFingerprintIds128, 1, kMaxIds)
BM(fastFingerprintTerms64, 1, kMaxTerms)
BM(slowFingerprintTerms64, 1, kMaxTerms)
BM(fastFingerprintTerms96, 1, kMaxTerms)
BM(fastFingerprintTerms128, 1, kMaxTerms)
# undef BM
BM(fastFingerprintIds64, 1, kMaxIds) initialize();
BM(slowFingerprintIds64, 1, kMaxIds) runBenchmarks();
BM(fastFingerprintIds96, 1, kMaxIds) return 0;
BM(fastFingerprintIds128, 1, kMaxIds)
BM(fastFingerprintTerms64, 1, kMaxTerms)
BM(slowFingerprintTerms64, 1, kMaxTerms)
BM(fastFingerprintTerms96, 1, kMaxTerms)
BM(fastFingerprintTerms128, 1, kMaxTerms)
# undef BM
runBenchmarks();
return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment