diff options
author | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-09-13 13:29:25 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-09-13 14:19:59 (GMT) |
commit | faba2072ae1cf3661caceae2ef4f87cee485cf29 (patch) | |
tree | 6b5ad9e0b4916aa167a1d2ca08f45bc31ab98f54 /src | |
parent | 52f82846e651d240f6e610f91bc63b3ee74b3d44 (diff) | |
download | Qt-faba2072ae1cf3661caceae2ef4f87cee485cf29.zip Qt-faba2072ae1cf3661caceae2ef4f87cee485cf29.tar.gz Qt-faba2072ae1cf3661caceae2ef4f87cee485cf29.tar.bz2 |
Use the stream operation for the SSE2 implementation of memfill32
Writing the data of memfill() to a cacheline is unecessary because the
data is not reused directly. We can use the stream operations to avoid
the cache completely.
When testing memfill32 separately, the function is twice as fast
on Core2 and Atom.
Reviewed-by: Samuel Rødal
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qdrawhelper_sse2.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp index ba2ba32..ac73958 100644 --- a/src/gui/painting/qdrawhelper_sse2.cpp +++ b/src/gui/painting/qdrawhelper_sse2.cpp @@ -266,10 +266,10 @@ void qt_memfill32_sse2(quint32 *dest, quint32 value, int count) int n = (count128 + 3) / 4; switch (count128 & 0x3) { - case 0: do { _mm_store_si128(dst128++, value128); - case 3: _mm_store_si128(dst128++, value128); - case 2: _mm_store_si128(dst128++, value128); - case 1: _mm_store_si128(dst128++, value128); + case 0: do { _mm_stream_si128(dst128++, value128); + case 3: _mm_stream_si128(dst128++, value128); + case 2: _mm_stream_si128(dst128++, value128); + case 1: _mm_stream_si128(dst128++, value128); } while (--n > 0); } |