diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2011-03-21 09:45:46 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2011-03-22 14:52:02 (GMT) |
commit | 6431c08d2f0352b2a74a2fc053eaec4566e4a6eb (patch) | |
tree | 03553acdd2b2ac3da1a0a57d7422fead525a07dc | |
parent | 3110ab6391971fb7b914ed1f797a0ff9e403501f (diff) | |
download | Qt-6431c08d2f0352b2a74a2fc053eaec4566e4a6eb.zip Qt-6431c08d2f0352b2a74a2fc053eaec4566e4a6eb.tar.gz Qt-6431c08d2f0352b2a74a2fc053eaec4566e4a6eb.tar.bz2 |
Add baselines and zeros to the benchmarks.
-rw-r--r-- | tests/benchmarks/corelib/tools/qstring/main.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp index d926aa5..c35f4d1 100644 --- a/tests/benchmarks/corelib/tools/qstring/main.cpp +++ b/tests/benchmarks/corelib/tools/qstring/main.cpp @@ -1655,7 +1655,8 @@ void fromLatin1_prolog_sse4_overcommit(ushort *dst, const char *str, int) void tst_QString::fromLatin1Alternatives_data() const { QTest::addColumn<FromLatin1Function>("function"); - QTest::newRow("regular") << &fromLatin1_regular; + QTest::newRow("empty", QTest::Zero) << FromLatin1Function(0); + QTest::newRow("regular", QTest::Baseline) << &fromLatin1_regular; QTest::newRow("sse2-qt4.7") << &fromLatin1_sse2_qt47; QTest::newRow("sse2-improved") << &fromLatin1_sse2_improved; QTest::newRow("sse2-with-prolog-regular") << &fromLatin1_sse2_withprolog<&fromLatin1_regular>; @@ -1680,6 +1681,8 @@ static void fromLatin1Alternatives_internal(FromLatin1Function function, QString int len = entries[i].len; const char *src = fromLatin1Data.charData + entries[i].offset1; + if (!function) + continue; if (!doVerify) { (function)(&dst.data()->unicode(), src, len); } else { @@ -1726,7 +1729,7 @@ int fromUtf8_latin1_qt47(ushort *dst, const char *chars, int len) return len; } -int fromUtf8_latin1best(ushort *dst, const char *chars, int len) +int fromUtf8_latin1_sse2_improved(ushort *dst, const char *chars, int len) { fromLatin1_sse2_improved(dst, chars, len); return len; @@ -2198,14 +2201,16 @@ int fromUtf8_sse2_trusted_no_bom(ushort *qch, const char *chars, int len) void tst_QString::fromUtf8Alternatives_data() const { QTest::addColumn<FromUtf8Function>("function"); - QTest::newRow("latin1-regular") << &fromUtf8_latin1_regular; - QTest::newRow("latin1-best") << &fromUtf8_latin1best; - QTest::newRow("latin1-qt4.7") << &fromUtf8_latin1_qt47; - QTest::newRow("qt-4.7") << &fromUtf8_qt47; + QTest::newRow("empty", QTest::Zero) << FromUtf8Function(0); + QTest::newRow("qt-4.7", QTest::Baseline) << &fromUtf8_qt47; QTest::newRow("qt-4.7-stateless") << &fromUtf8_qt47_stateless; QTest::newRow("optimized-for-ascii") << &fromUtf8_optimised_for_ascii; QTest::newRow("sse2-optimized-for-ascii") << &fromUtf8_sse2_optimised_for_ascii; QTest::newRow("sse2-trusted-no-bom") << &fromUtf8_sse2_trusted_no_bom; + + QTest::newRow("latin1-generic") << &fromUtf8_latin1_regular; + QTest::newRow("latin1-sse2-qt4.7") << &fromUtf8_latin1_qt47; + QTest::newRow("latin1-sse2-improved") << &fromUtf8_latin1_sse2_improved; } extern StringData fromUtf8Data; @@ -2231,6 +2236,8 @@ static void fromUtf8Alternatives_internal(FromUtf8Function function, QString &ds int len = entries[i].len; const char *src = fromUtf8Data.charData + entries[i].offset1; + if (!function) + continue; if (!doVerify) { (function)(&dst.data()->unicode(), src, len); } else { |