diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-01-25 14:19:40 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-01-04 07:58:57 -0800 |
commit | 3ec5d83d2a237d39e7fd6ef7a0bc8ac4c171a4a5 (patch) | |
tree | 6d2205ddecade9c780d12c37a809a3c8d4fc3384 /stdlib/bug-fmtmsg1.c | |
parent | cd6274089f7a7603cdaf2a24cef575fa61d3772e (diff) | |
download | glibc-3ec5d83d2a237d39e7fd6ef7a0bc8ac4c171a4a5.tar glibc-3ec5d83d2a237d39e7fd6ef7a0bc8ac4c171a4a5.tar.gz glibc-3ec5d83d2a237d39e7fd6ef7a0bc8ac4c171a4a5.tar.bz2 glibc-3ec5d83d2a237d39e7fd6ef7a0bc8ac4c171a4a5.zip |
x86-64: Avoid rep movsb with short distance [BZ #27130]
When copying with "rep movsb", if the distance between source and
destination is N*4GB + [1..63] with N >= 0, performance may be very
slow. This patch updates memmove-vec-unaligned-erms.S for AVX and
AVX512 versions with the distance in RCX:
cmpl $63, %ecx
// Don't use "rep movsb" if ECX <= 63
jbe L(Don't use rep movsb")
Use "rep movsb"
Benchtests data with bench-memcpy, bench-memcpy-large, bench-memcpy-random
and bench-memcpy-walk on Skylake, Ice Lake and Tiger Lake show that its
performance impact is within noise range as "rep movsb" is only used for
data size >= 4KB.
Diffstat (limited to 'stdlib/bug-fmtmsg1.c')
0 files changed, 0 insertions, 0 deletions