X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Ftest%2FAsciiCaseInsensitiveBenchmark.cpp;h=30b989d8ff2ba6b3ec58ae69c6dd2ae73d1cb03c;hb=26b139fc3520828f080d459b0f8cbd271cab7a89;hp=610dba67e43e7b7d1b503706f952b8db4794ad3d;hpb=ce64f0f685111ac24c7a321ea56d0c3524621df1;p=folly.git diff --git a/folly/test/AsciiCaseInsensitiveBenchmark.cpp b/folly/test/AsciiCaseInsensitiveBenchmark.cpp index 610dba67..30b989d8 100644 --- a/folly/test/AsciiCaseInsensitiveBenchmark.cpp +++ b/folly/test/AsciiCaseInsensitiveBenchmark.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2014 Facebook, Inc. + * Copyright 2016 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -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();