Implement faster mju_isZeroByte.

PiperOrigin-RevId: 814148714
Change-Id: Iaf5ed9d3502eaaaee8d46a986f2db00811ae0707
This commit is contained in:
Kyle Bayes
2025-10-02 02:53:02 -07:00
committed by Copybara-Service
parent 401bf431b8
commit 91257896c0
4 changed files with 42 additions and 21 deletions
+10
View File
@@ -46,6 +46,11 @@ ABSL_ATTRIBUTE_NO_TAIL_CALL static void IzZeroBenchmark(
}
// Define benchmarks.
void BM_isZeroByte_10(benchmark::State& state) {
IzZeroBenchmark(state, 10, true);
}
BENCHMARK(BM_isZeroByte_10);
void BM_isZeroByte_1e2(benchmark::State& state) {
IzZeroBenchmark(state, 100, true);
}
@@ -56,6 +61,11 @@ void BM_isZeroByte_1e5(benchmark::State& state) {
}
BENCHMARK(BM_isZeroByte_1e5);
void BM_isZero_10(benchmark::State& state) {
IzZeroBenchmark(state, 10, false);
}
BENCHMARK(BM_isZero_10);
void BM_isZero_1e2(benchmark::State& state) {
IzZeroBenchmark(state, 100, false);
}