]> git.ipfire.org Git - thirdparty/zstd.git/commit
[cover] Improvements for small or homogeneous data 1556/head
authorNick Terrell <terrelln@fb.com>
Fri, 22 Mar 2019 19:28:55 +0000 (12:28 -0700)
committerNick Terrell <terrelln@fb.com>
Fri, 22 Mar 2019 21:14:46 +0000 (14:14 -0700)
commitd0f5ba36fb83dfdcae28badd7918d83cb011a6b8
tree5b24ac7790157980f4ea41e8bf7e31ca2c69a64e
parent0c7668cd06d715b290ad4648162ec7e78ebeb2de
[cover] Improvements for small or homogeneous data

* The algorithm would bail as soon as it found one epoch that
  contained no new segments. Change it so it now has to fail
  >= 10 times in a row (10 for fastcover, 10-100 for cover).
* The algorithm uses the `maxDict` size to decide the epoch size.
  When this size is absurdly large, it causes tiny epochs. Lower
  bound the epoch size at 10x the segment size, and warn the user
  that their training set is too small.

Fixes #1554
lib/dictBuilder/cover.c
lib/dictBuilder/cover.h
lib/dictBuilder/fastcover.c