From d21a4d60394a4372c6a440d3a7b6606e0b209e70 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 18 Mar 2011 17:21:16 +0100 Subject: Try to improve the prolog by doing less operations --- tests/benchmarks/corelib/tools/qstring/main.cpp | 14 +++++++------- 1 file 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]; } } -- cgit v0.12