diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-01-12 05:15:49 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-01-12 07:04:55 -0800 |
commit | 56fbd0ba218c59a1cc8c29464f153d45a4c887c0 (patch) | |
tree | 5756e6ddd05ef6039c8c1363e1c364ce0d381702 /sysdeps/unix/sysv/linux/pthread_getaffinity.c | |
parent | d81114e0aaedc30d82956d3a21ae6777b3fbba3c (diff) | |
download | glibc-56fbd0ba218c59a1cc8c29464f153d45a4c887c0.tar glibc-56fbd0ba218c59a1cc8c29464f153d45a4c887c0.tar.gz glibc-56fbd0ba218c59a1cc8c29464f153d45a4c887c0.tar.bz2 glibc-56fbd0ba218c59a1cc8c29464f153d45a4c887c0.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.
(cherry picked from commit 3ec5d83d2a237d39e7fd6ef7a0bc8ac4c171a4a5)
Diffstat (limited to 'sysdeps/unix/sysv/linux/pthread_getaffinity.c')
0 files changed, 0 insertions, 0 deletions