diff options
author | Yann Collet <cyan@fb.com> | 2017-12-22 07:07:25 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2017-12-22 07:07:25 (GMT) |
commit | 9753ac4c91b926114ae636d1d7103dd24e5c0f57 (patch) | |
tree | 84b09d9af6a2d1edc9493ed7fe9e89ac324e3f93 /lib/lz4frame_static.h | |
parent | 8a9c8e73241672c1db29be454a9b8388bfde5034 (diff) | |
download | lz4-9753ac4c91b926114ae636d1d7103dd24e5c0f57.zip lz4-9753ac4c91b926114ae636d1d7103dd24e5c0f57.tar.gz lz4-9753ac4c91b926114ae636d1d7103dd24e5c0f57.tar.bz2 |
conditional pattern analysis
Pattern analysis (currently limited to long ranges of identical bytes)
is actually detrimental to performance
when `nbSearches` is low.
Reason is : `nbSearches` provides a built-in protection for these cases.
The problem with patterns is that they dramatically increase the number of candidates to visit.
But with a low nbSearches, the match finder just aborts early.
In such cases, pattern analysis adds some complexity without reducing total nb of candidates.
It actually increases compression ratio a little bit, by filtering only "good" candidates,
but at a measurable speed cost, so it's not a good trade-off.
This patch makes pattern analysis optional.
It's enabled for levels 8+ only.
Diffstat (limited to 'lib/lz4frame_static.h')
0 files changed, 0 insertions, 0 deletions