From: Eric Biggers Date: Thu, 12 Jun 2014 03:34:33 +0000 (-0500) Subject: lzx.h: Align 'struct lzx_lru_queue' on x86_64 X-Git-Tag: v1.7.0~39 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=eb01806c3c38cdfed39a1096e70116f8c8f6ef3f lzx.h: Align 'struct lzx_lru_queue' on x86_64 --- diff --git a/include/wimlib/lzx.h b/include/wimlib/lzx.h index 50d80f62..ae1c6a9c 100644 --- a/include/wimlib/lzx.h +++ b/include/wimlib/lzx.h @@ -6,6 +6,7 @@ * */ #include "wimlib/assert.h" +#include "wimlib/compiler.h" #include "wimlib/util.h" #include "wimlib/types.h" @@ -142,7 +143,13 @@ extern unsigned lzx_get_num_main_syms(u32 window_size); /* Least-recently used queue for match offsets. */ struct lzx_lru_queue { u32 R[LZX_NUM_RECENT_OFFSETS]; -}; +} +#ifdef __x86_64__ +_aligned_attribute(8) /* Improves performance of LZX compression by 1% - 2%; + specifically, this speeds up + lzx_get_near_optimal_match(). */ +#endif +; /* In the LZX format, an offset of n bytes is actually encoded * as (n + LZX_OFFSET_OFFSET). */