mirror of https://git.tukaani.org/xz.git
Use unaligned access (if possible) on both endiannesses
in lz_encoder_hash.h.
This commit is contained in:
parent
c5f68b5cc7
commit
3782b3fee4
|
@ -36,8 +36,8 @@
|
||||||
#define FIX_4_HASH_SIZE (HASH_2_SIZE + HASH_3_SIZE)
|
#define FIX_4_HASH_SIZE (HASH_2_SIZE + HASH_3_SIZE)
|
||||||
#define FIX_5_HASH_SIZE (HASH_2_SIZE + HASH_3_SIZE + HASH_4_SIZE)
|
#define FIX_5_HASH_SIZE (HASH_2_SIZE + HASH_3_SIZE + HASH_4_SIZE)
|
||||||
|
|
||||||
// TODO Benchmark, and probably doesn't need to be endian dependent.
|
// Endianness doesn't matter in hash_2_calc() (no effect on the output).
|
||||||
#if !defined(WORDS_BIGENDIAN) && defined(HAVE_FAST_UNALIGNED_ACCESS)
|
#ifdef HAVE_FAST_UNALIGNED_ACCESS
|
||||||
# define hash_2_calc() \
|
# define hash_2_calc() \
|
||||||
const uint32_t hash_value = *(const uint16_t *)(cur);
|
const uint32_t hash_value = *(const uint16_t *)(cur);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue