]> sourceware.org Git - glibc.git/commit
x86_64: Optimize ffsll function code size.
authorSunil K Pandey <skpgkp2@gmail.com>
Wed, 26 Jul 2023 15:34:05 +0000 (08:34 -0700)
committerSunil K Pandey <skpgkp2@gmail.com>
Sat, 13 Jan 2024 20:20:08 +0000 (12:20 -0800)
commit9d94997b5f9445afd4f2bccc5fa60ff7c4361ec1
tree4a2b64a9eaac5cac1147c8ae8bb25504b4f7407c
parentfe6c8bab3a8dad3927a12eecd7ec7d67602b5862
x86_64: Optimize ffsll function code size.

Ffsll function randomly regress by ~20%, depending on how code gets
aligned in memory.  Ffsll function code size is 17 bytes.  Since default
function alignment is 16 bytes, it can load on 16, 32, 48 or 64 bytes
aligned memory.  When ffsll function load at 16, 32 or 64 bytes aligned
memory, entire code fits in single 64 bytes cache line.  When ffsll
function load at 48 bytes aligned memory, it splits in two cache line,
hence random regression.

Ffsll function size reduction from 17 bytes to 12 bytes ensures that it
will always fit in single 64 bytes cache line.

This patch fixes ffsll function random performance regression.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
sysdeps/x86_64/ffsll.c
This page took 0.039282 seconds and 5 git commands to generate.