Fix off-by-one error: the next ASCII character is next one
The bit scan function returns the index of the last non-ASCII character. The next ASCII is the one after this. This means all the benchmarks were made while reentering the SIMD loop uselessly... Change-Id: If7de485a63428bfa36d413049d9239ddda1986aa Reviewed-by: Lars Knoll <lars.knoll@digia.com>bb10
parent
3a3a7f8842
commit
c1d4a634cb
|
|
@ -85,7 +85,7 @@ static inline bool simdEncodeAscii(uchar *&dst, const ushort *&nextAscii, const
|
|||
// we don't want to load 32 bytes again in this loop if we know there are non-ASCII
|
||||
// characters still coming
|
||||
n = _bit_scan_reverse(n);
|
||||
nextAscii = src + n;
|
||||
nextAscii = src + n + 1;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ static inline bool simdDecodeAscii(ushort *&dst, const uchar *&nextAscii, const
|
|||
// we don't want to load 16 bytes again in this loop if we know there are non-ASCII
|
||||
// characters still coming
|
||||
n = _bit_scan_reverse(n);
|
||||
nextAscii = src + n;
|
||||
nextAscii = src + n + 1;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue