+void BENCHFUN(equality)(int iters, int arg) {
+ std::vector<STRING> haystack(arg);
+
+ BENCHMARK_SUSPEND {
+ for (auto& hay : haystack) {
+ randomBinaryString(&hay, 1024);
+ }
+ }
+
+ FOR_EACH_RANGE (i, 0, iters) {
+ STRING needle;
+ randomBinaryString(&needle, 1024);
+ doNotOptimizeAway(std::find(haystack.begin(), haystack.end(), needle));
+ }
+}
+BENCHMARK_PARAM(BENCHFUN(equality), 65536);
+