diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2021-11-23 00:48:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-23 00:48:53 (GMT) |
commit | db57809cf189feb2dd690d55abc2884c95c6fc00 (patch) | |
tree | 95c00d8d9e569295d06d06ac042858c47164ffe9 /lib/lz4.c | |
parent | 8f61d8eb7c6979769a484cde8df61ff7c4c77765 (diff) | |
parent | 22e232dadaa36341afce0d3f114a3846273f0d2f (diff) | |
download | lz4-db57809cf189feb2dd690d55abc2884c95c6fc00.zip lz4-db57809cf189feb2dd690d55abc2884c95c6fc00.tar.gz lz4-db57809cf189feb2dd690d55abc2884c95c6fc00.tar.bz2 |
Merge pull request #1040 from zeux/m1-fastdec
Enable fast decoding on Apple/AArch64 builds (18-25% faster decompression)
Diffstat (limited to 'lib/lz4.c')
-rw-r--r-- | lib/lz4.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -421,10 +421,12 @@ static const int dec64table[8] = {0, 0, 0, -1, -4, 1, 2, 3}; #ifndef LZ4_FAST_DEC_LOOP # if defined __i386__ || defined _M_IX86 || defined __x86_64__ || defined _M_X64 # define LZ4_FAST_DEC_LOOP 1 +# elif defined(__aarch64__) && defined(__APPLE__) +# define LZ4_FAST_DEC_LOOP 1 # elif defined(__aarch64__) && !defined(__clang__) - /* On aarch64, we disable this optimization for clang because on certain - * mobile chipsets, performance is reduced with clang. For information - * refer to https://github.com/lz4/lz4/pull/707 */ + /* On non-Apple aarch64, we disable this optimization for clang because + * on certain mobile chipsets, performance is reduced with clang. For + * more information refer to https://github.com/lz4/lz4/pull/707 */ # define LZ4_FAST_DEC_LOOP 1 # else # define LZ4_FAST_DEC_LOOP 0 |