diff options
author | root <root> | 2007-11-13 08:17:38 +0000 |
---|---|---|
committer | root <root> | 2007-11-13 08:17:38 +0000 |
commit | a097fcd099d2e2bb649a1de8e0e10909ac470770 (patch) | |
tree | 4f6b189b1f1259de34effc0c660745636b4db5ed /lzf_c.c | |
parent | 29dff116a202a0a7f7dc2a1e34db43c4263ebf8e (diff) |
unroll a bit for testing
Diffstat (limited to 'lzf_c.c')
-rw-r--r-- | lzf_c.c | 25 |
1 files changed, 21 insertions, 4 deletions
@@ -160,10 +160,6 @@ lzf_compress (const void *const in_data, unsigned int in_len, if (expect_false (op + lit + 1 + 3 >= out_end)) return 0; - do - len++; - while (len < maxlen && ref[len] == ip[len]); - if (lit) { *op++ = lit - 1; @@ -173,6 +169,27 @@ lzf_compress (const void *const in_data, unsigned int in_len, while (++lit); } + for (;;) + { + if (expect_true (ip < in_end - 2 - 8 && maxlen > 8)) + { + len++; if (ref [len] != ip [len]) break; + len++; if (ref [len] != ip [len]) break; + len++; if (ref [len] != ip [len]) break; + len++; if (ref [len] != ip [len]) break; + len++; if (ref [len] != ip [len]) break; + len++; if (ref [len] != ip [len]) break; + len++; if (ref [len] != ip [len]) break; + len++; if (ref [len] != ip [len]) break; + } + + do + len++; + while (len < maxlen && ref[len] == ip[len]); + + break; + } + len -= 2; ip++; |