summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2017-03-18 01:07:53 (GMT)
committerYann Collet <cyan@fb.com>2017-03-18 01:07:53 (GMT)
commitf513020a6df8e1c8c51e03d849c8574f821b765b (patch)
tree2d3ae6248430493f22c6cce59086b27e8cc554fd /lib
parent8bd32a17b112dd46f61d835e4368ff1bc4464048 (diff)
downloadlz4-f513020a6df8e1c8c51e03d849c8574f821b765b.zip
lz4-f513020a6df8e1c8c51e03d849c8574f821b765b.tar.gz
lz4-f513020a6df8e1c8c51e03d849c8574f821b765b.tar.bz2
slight btopt speed improvement
removing a useless test
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4opt.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lz4opt.h b/lib/lz4opt.h
index f12468a..155b1fc 100644
--- a/lib/lz4opt.h
+++ b/lib/lz4opt.h
@@ -278,8 +278,8 @@ static int LZ4HC_compress_optimal (
mlen = 1;
best_mlen = 0;
- if (cur > last_pos || price < (size_t)opt[cur].price)
- SET_PRICE(cur, mlen, best_mlen, litlen, price);
+ if (price < (size_t)opt[cur].price)
+ SET_PRICE(cur, mlen, best_mlen, litlen, price); /* note : increases last_pos */
if (cur == last_pos || inr >= mflimit) break;