|
@ -260,8 +260,23 @@ static void IsMirrorCompare(benchmark::State &state) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void CommonCodeCheck(benchmark::State &state) { |
|
|
|
|
|
|
|
|
|
|
|
std::vector<uint64_t> samples = common_code_samples(state.range(0)); |
|
|
|
|
|
|
|
|
|
|
|
for (auto _ : state) { |
|
|
|
|
|
for (auto code : samples) { |
|
|
|
|
|
volatile auto tmp = CommonCode::check(code); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
state.SetItemsProcessed(state.iterations() * state.range(0)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BENCHMARK(CommonCodeCheck)->Range(64, 1024); |
|
|
|
|
|
|
|
|
// BENCHMARK(CommonCodeSerialize)->Range(8, 256);
|
|
|
// BENCHMARK(CommonCodeSerialize)->Range(8, 256);
|
|
|
BENCHMARK(CommonCodeDeserialize)->Range(8, 256); |
|
|
//BENCHMARK(CommonCodeDeserialize)->Range(8, 256);
|
|
|
// BENCHMARK(CommonCodeSerializeShorten)->Range(8, 256);
|
|
|
// BENCHMARK(CommonCodeSerializeShorten)->Range(8, 256);
|
|
|
// BENCHMARK(CommonCodeDeserializeShorten)->Range(8, 256);
|
|
|
// BENCHMARK(CommonCodeDeserializeShorten)->Range(8, 256);
|
|
|
|
|
|
|
|
|