summaryrefslogtreecommitdiffstats
path: root/src/tools/macdeployqt/shared/shared.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-01-09 16:31:11 -0800
committerThiago Macieira <thiago.macieira@intel.com>2022-12-07 09:57:59 -0800
commit3465b9fe74d42743ffa9d8f3d24418827ade9ea7 (patch)
tree91892d8e3f6c0106b7c31e0e4c7d4568dd30c8e2 /src/tools/macdeployqt/shared/shared.cpp
parentcff4cde41236fa44b6c4f94ba9f5cf550ae351b0 (diff)
QString: merge and optimize the two overloads of SSE2's ustrncmp()
The algorithm is the same, differing only on how we load data onto vector registers, so they can be merged, simplifying the code base. For all strings over 16 characters in length, we loop and then we perform a final overlapped comparison, if necessary. I've kept the 32- byte-per-loop solution even for pre-AVX2, because that should pipeline better. For any strings between 4 and 16 characters, we perform a pair of maybe-overlapped comparisons, of either 4 characters or of 8, so we consume the full string. That leaves a tail of at most 3 characters in scalar code. Change-Id: Ib42b3adc93bf4d43bd55fffd16c8c15d6d761af2 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Diffstat (limited to 'src/tools/macdeployqt/shared/shared.cpp')
0 files changed, 0 insertions, 0 deletions