X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Ftest%2FAsciiCaseInsensitiveBenchmark.cpp;h=b1f9142e89e101a1648182d65e18299dcbd161c8;hb=6435670bdccef08dcd2713ecbed1a57caa7abfad;hp=89c92b75606baf4f7eb48c8bdcba130a8ed7ac44;hpb=10a3632117951cb83334903385d13a176e8ce14e;p=folly.git diff --git a/folly/test/AsciiCaseInsensitiveBenchmark.cpp b/folly/test/AsciiCaseInsensitiveBenchmark.cpp index 89c92b75..b1f9142e 100644 --- a/folly/test/AsciiCaseInsensitiveBenchmark.cpp +++ b/folly/test/AsciiCaseInsensitiveBenchmark.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2014 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,8 +14,8 @@ * limitations under the License. */ -#include "folly/Benchmark.h" -#include "folly/Range.h" +#include +#include #include @@ -80,7 +80,7 @@ string lorem_ipsum = "vulputate quam urna quis eros. Donec vel." "\n"; -string needle = "commodo"; +const string needle = "commodo"; // legacy implementation struct AsciiCaseInsensitiveLegacy { @@ -100,6 +100,7 @@ inline void test_operator_on_search(int iters) { cmp ) - lorem_ipsum.begin(); } + doNotOptimizeAway(dummy); } BENCHMARK(LegacyCaseInsensitiveCheck, iters) { @@ -111,7 +112,7 @@ BENCHMARK(CurrentCaseInsensitiveCheck, iters) { } int main(int argc, char** argv) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); if (FLAGS_benchmark) { folly::runBenchmarks();