summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2011-03-18 16:21:16 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2011-03-22 14:51:49 (GMT)
commitd21a4d60394a4372c6a440d3a7b6606e0b209e70 (patch)
tree2e1182d91f1f6f0666c551f4a0354513a6c91e4f /tests
parentda88d5889a6b60b64403342b5bfbae54462d3111 (diff)
downloadQt-d21a4d60394a4372c6a440d3a7b6606e0b209e70.zip
Qt-d21a4d60394a4372c6a440d3a7b6606e0b209e70.tar.gz
Qt-d21a4d60394a4372c6a440d3a7b6606e0b209e70.tar.bz2
Try to improve the prolog by doing less operations
Diffstat (limited to 'tests')
-rw-r--r--tests/benchmarks/corelib/tools/qstring/main.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp
index 35e1939..0aff77c 100644
--- a/tests/benchmarks/corelib/tools/qstring/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstring/main.cpp
@@ -1481,19 +1481,19 @@ void fromLatin1_prolog_unrolled(ushort *dst, const char *str, int size)
{
switch (size) {
case 7:
- *dst++ = (uchar)*str++;
+ dst[6] = (uchar)str[6];
case 6:
- *dst++ = (uchar)*str++;
+ dst[5] = (uchar)str[5];
case 5:
- *dst++ = (uchar)*str++;
+ dst[4] = (uchar)str[4];
case 4:
- *dst++ = (uchar)*str++;
+ dst[3] = (uchar)str[3];
case 3:
- *dst++ = (uchar)*str++;
+ dst[2] = (uchar)str[2];
case 2:
- *dst++ = (uchar)*str++;
+ dst[1] = (uchar)str[1];
case 1:
- *dst++ = (uchar)*str++;
+ dst[0] = (uchar)str[0];
}
}