mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-03-09 11:09:32 +01:00
Use aligned SSE register load intrinsic.
The code goes to the trouble of ensuring that data is aligned at a 16-byte boundary, then goes ahead and uses the unaligned form of the load intrinsic _mm_loadu_si128. Either the code shouldn't bother aligning the data to the start of the whitespace, or it should use the aligned form of the intrinsic.
This commit is contained in:
parent
24dd7ef839
commit
41f3c60b22
@ -277,7 +277,7 @@ inline const char *SkipWhitespace_SIMD(const char* p) {
|
||||
|
||||
// The rest of string using SIMD
|
||||
static const char whitespace[16] = " \n\r\t";
|
||||
const __m128i w = _mm_loadu_si128((const __m128i *)&whitespace[0]);
|
||||
const __m128i w = _mm_load_si128((const __m128i *)&whitespace[0]);
|
||||
|
||||
for (;; p += 16) {
|
||||
const __m128i s = _mm_load_si128((const __m128i *)p);
|
||||
|
Loading…
x
Reference in New Issue
Block a user