From dd641edac04378dd4277de0eaaff5d0f798e0ba5 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 1 Jun 2010 01:50:24 +0000 Subject: *** empty log message *** --- Changes | 1 + lzf_c.c | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index 99c0405..db70df9 100644 --- a/Changes +++ b/Changes @@ -5,6 +5,7 @@ - finally disable rep movsb - it's a big loss on modern intel cpus, and only a small win on amd cpus. - improve c++ compatibility of the code. + - slightly improve compressor speed. 3.5 Fri May 1 02:28:42 CEST 2009 - lzf_compress did sometimes write one octet past the given output diff --git a/lzf_c.c b/lzf_c.c index 85b861b..1878954 100644 --- a/lzf_c.c +++ b/lzf_c.c @@ -155,13 +155,11 @@ lzf_compress (const void *const in_data, unsigned int in_len, && (off = ip - ref - 1) < MAX_OFF && ip + 4 < in_end && ref > (u8 *)in_data -#if STRICT_ALIGN - && ref[0] == ip[0] - && ref[1] == ip[1] && ref[2] == ip[2] +#if STRICT_ALIGN + && (ref[1] << 8) | ref[0] == (ip[1] << 8) | ip[0] #else && *(u16 *)ref == *(u16 *)ip - && ref[2] == ip[2] #endif ) { -- cgit v1.2.3