Bug 1450907 - Spend less time benchmarking HasRTLChars. r=jfkthame

This sets a new baseline for these benchmarks.

MozReview-Commit-ID: 1BotMvQ8Rjg

--HG--
extra : rebase_source : 5dd8f6004dd477ce57f94d5af072859b280d30f8
This commit is contained in:
Henri Sivonen 2018-04-03 13:15:06 +03:00
parent efef8dceab
commit 19462f3cb6

View File

@ -1582,35 +1582,35 @@ MOZ_GTEST_BENCH_F(Strings, PerfIsASCIIExample3, [this] {
});
MOZ_GTEST_BENCH_F(Strings, PerfHasRTLCharsExample3, [this] {
for (int i = 0; i < 100000; i++) {
for (int i = 0; i < 5000; i++) {
bool b = HasRTLChars(*BlackBox(&mExample3Utf16));
BlackBox(&b);
}
});
MOZ_GTEST_BENCH_F(Strings, PerfHasRTLCharsDE, [this] {
for (int i = 0; i < 100000; i++) {
for (int i = 0; i < 5000; i++) {
bool b = HasRTLChars(*BlackBox(&mDeUtf16));
BlackBox(&b);
}
});
MOZ_GTEST_BENCH_F(Strings, PerfHasRTLCharsRU, [this] {
for (int i = 0; i < 100000; i++) {
for (int i = 0; i < 5000; i++) {
bool b = HasRTLChars(*BlackBox(&mRuUtf16));
BlackBox(&b);
}
});
MOZ_GTEST_BENCH_F(Strings, PerfHasRTLCharsTH, [this] {
for (int i = 0; i < 100000; i++) {
for (int i = 0; i < 5000; i++) {
bool b = HasRTLChars(*BlackBox(&mThUtf16));
BlackBox(&b);
}
});
MOZ_GTEST_BENCH_F(Strings, PerfHasRTLCharsJA, [this] {
for (int i = 0; i < 100000; i++) {
for (int i = 0; i < 5000; i++) {
bool b = HasRTLChars(*BlackBox(&mJaUtf16));
BlackBox(&b);
}