diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-11-26 16:15:25 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-12-04 04:28:15 +0800 |
commit | 1c4cebb84b9e33aea9a90adfadb031d1f1eba927 (patch) | |
tree | b8c59eb6388c942da858d8a1881e739c17493d73 /sysdeps/unix/sysv/linux/sh | |
parent | f43eb2cf30fdff39bda1c2018246d4badabbc576 (diff) | |
download | glibc-1c4cebb84b9e33aea9a90adfadb031d1f1eba927.zip glibc-1c4cebb84b9e33aea9a90adfadb031d1f1eba927.tar.gz glibc-1c4cebb84b9e33aea9a90adfadb031d1f1eba927.tar.bz2 |
malloc: Optimize small memory clearing for calloc
Add calloc-clear-memory.h to clear memory size up to 36 bytes (72 bytes
on 64-bit targets) for calloc. Use repeated stores with 1 branch, instead
of up to 3 branches. On x86-64, it is faster than memset since calling
memset needs 1 indirect branch, 1 broadcast, and up to 4 branches.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/sh')
0 files changed, 0 insertions, 0 deletions