diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-02-26 02:07:08 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-02-26 02:07:08 -0500 |
commit | e346ff86c8faee901a7c2d502b5beb983b99f972 (patch) | |
tree | 7f08e43d71fab39cf3b8379625944193322ff933 /src/string/index.c | |
parent | 69858fa93107aa7485b143c54137e745a7b7ad72 (diff) | |
download | musl-e346ff86c8faee901a7c2d502b5beb983b99f972.tar.gz musl-e346ff86c8faee901a7c2d502b5beb983b99f972.tar.xz musl-e346ff86c8faee901a7c2d502b5beb983b99f972.zip |
overhaul optimized x86_64 memset asm
on most cpu models, "rep stosq" has high overhead that makes it undesirable for small memset sizes. the new code extends the minimal-branch fast path for short memsets from size 15 up to size 126, and shrink-wraps this code path. in addition, "rep stosq" is sensitive to misalignment. the cost varies with size and with cpu model, but it has been observed performing 1.5 times slower when the destination address is not aligned mod 16. the new code thus ensures alignment mod 16, but also preserves any existing additional alignment, in case there are cpu models where it is beneficial. this version is based in part on changes proposed by Denys Vlasenko.
Diffstat (limited to 'src/string/index.c')
0 files changed, 0 insertions, 0 deletions