diff options
author | Nathan Moinvaziri <nathan@nathanm.com> | 2020-04-21 10:29:37 -0700 |
---|---|---|
committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2020-04-30 10:01:46 +0200 |
commit | 0129e88cee5f5ac295c311d5d94f2bb6a2f475f6 (patch) | |
tree | f8ea2b566104af729458240ec415d8a5812b438e /insert_string_tpl.h | |
parent | 51e695092d18cae456af802bec106192f73d9bf6 (diff) |
Removed TRIGGER_LEVEL byte masking from INSERT_STRING and UPDATE_HASH due to poor performance on levels 6 and 9 especially with optimized versions of UPDATE_HASH.
From commit d306c75d3bb36cba73aec9b3b3ca378e31d1799e:
.. we hash 4 bytes, instead of 3, for certain levels. This shortens the hash chains, and also improves the quality
of each hash entry.
Diffstat (limited to 'insert_string_tpl.h')
-rw-r--r-- | insert_string_tpl.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/insert_string_tpl.h b/insert_string_tpl.h index 0e90c3b..c80c9f8 100644 --- a/insert_string_tpl.h +++ b/insert_string_tpl.h @@ -41,9 +41,6 @@ ZLIB_INTERNAL Pos QUICK_INSERT_STRING(deflate_state *const s, const Pos str) { val |= ((uint32_t)s->window[str+3] << 24); #endif - if (s->level >= TRIGGER_LEVEL) - val &= 0xFFFFFF; - UPDATE_HASH(s, h, val); hm = h & s->hash_mask; @@ -87,9 +84,6 @@ ZLIB_INTERNAL Pos INSERT_STRING(deflate_state *const s, const Pos str, unsigned val |= ((uint32_t)(strstart[3]) << 24); #endif - if (s->level >= TRIGGER_LEVEL) - val &= 0xFFFFFF; - UPDATE_HASH(s, h, val); hm = h & s->hash_mask; |