Commit Graph
11725 Commits
Author SHA1 Message Date
Mark Harfouche 148ff15774 Fixup MSVC source file inclusion for cmake builds 2021-12-27 02:21:21 -05:00
Paweł Marciniak 666372c7bf Fix tar test cases 2021-12-24 15:05:26 +01:00
Yann Collet 1aed962216 introduce macros STORE_OFFSET() and STORE_REPCODE()
this meant to abstract the sumtype representation required
to transfert `offcode` to `ZSTD_storeSeq()`.

Unfortunately, the sumtype numeric representation is currently a leaky abstraction
that has permeated many other parts of the code,
especially within `zstd_lazy.c` and also within `zstd_opt.c` and `zstd_compress.c`.

While this PR makes a good job a transfering a large nb of call sites
to using the new macros, there are still a few sites where this transformation is more complex,
or where the numeric representation itself it used "as is".

One of the problematics area is the decision to use the numeric format of the sumtype
within the match finders of `zstd_lazy`.

This commit doesn't change the behavior, it only introduces and employes the macros,
but eventually the resulting code remains identical.

At target, if the numeric representation of the sumtype can be completely abstracted
and no other part of the code depends on it,
it will be possible to move it towards something slightly more efficient.
2021-12-23 22:03:30 -08:00
Yann Collet bec7bbb5a4 Merge branch 'dev' into seqStore_off 2021-12-23 18:03:17 -08:00
Yann Collet aeff128331 change seqDef.offset into seqDef.offBase
to better reflect the value stored in this field.
2021-12-23 17:56:08 -08:00
Yann Collet 75525fcb9f library optimization flag can be selected on command line again
`CFLAGS=-O0 make`
will now use `-O0` instead of enforcing `-O3`
which used to be the behavior before introduction of `libzstd.mk`.

This should result in faster tests,
since a few tests depend on this capability for faster roundtrips.
2021-12-23 17:43:12 -08:00
Yann Collet e145b58cfd changed seqDef.matchLength into seqDef.mlBase
since this is effectively what is stored in this field (== matchLength - MINMATCH).
This makes it clearer what needs to be done when reading from / writing to this field.
2021-12-23 13:39:46 -08:00
Yann Collet b77fcac61f change ZSTD_storeSeq() interface to accept matchLength
instead of mlBase.

This removes the need to do `- MINMATCH` at every call site.

The new interface contract is checked with an `assert()`.
2021-12-23 12:03:33 -08:00
Eli Schwartz 29e44bc554 meson: fix MSVC support
Regression from commit a5f2c45528. It is
not possible to unconditionally add the asm sources, since not all
compilers understand the .s file extension.

Specifically for meson, only compilers inheriting from the GNU mixin
will allow a .s file at configure time.

zstd doesn't support asm for MSVC for the same basic reason; if/when
Windows asm support is added, it would involve preprocessing with nasm,
most likely.
2021-12-22 20:20:30 -05:00
Yann ColletandGitHub eebf24bd2a Merge pull request #2947 from MehdiChinoune/patch-1
Fix zstd-static output name with MINGW/Clang
2021-12-22 11:13:40 -08:00
مهدي شينون (Mehdi Chinoune)andMehdi Chinoune 14a0eaf73b Fix zstd-static output name with MINGW/Clang 2021-12-22 10:16:41 +01:00
Yann Collet 41153071a0 updated manual 2021-12-21 08:52:50 -08:00
Yann ColletandGitHub 791626dfb9 Merge pull request #2942 from facebook/dev
update man pages for v1.5.1
v1.5.1
2021-12-20 14:49:18 -08:00
Yann Collet abc694f53e update man pages 2021-12-20 14:24:06 -08:00
Yann ColletandGitHub f4a541b021 Merge pull request #2941 from facebook/dev
v1.5.1
2021-12-20 13:49:33 -08:00
Yann Collet 1219b7f3e3 updated changelog for v1.5.1 2021-12-20 12:28:27 -08:00
Yann ColletandGitHub 24960134d9 Merge pull request #2940 from facebook/revert-2885-limit-level-32bit-systems
Revert "Limit `ZSTD_maxCLevel` to 21 for 32-bit binaries."
2021-12-20 12:27:28 -08:00
Yann ColletandGitHub a9e43b37d0 Revert "Limit ZSTD_maxCLevel to 21 for 32-bit binaries." 2021-12-20 11:43:14 -08:00
Yann ColletandGitHub 85bd1e663b Merge pull request #2934 from facebook/lazy_rebalance
rebalance lazy compression levels
2021-12-20 11:37:44 -08:00
Yann Collet 2624652a32 Merge branch 'dev' into lazy_rebalance 2021-12-20 08:28:21 -08:00
Yann Collet 80a28f2078 update regression results 2021-12-20 07:54:57 -08:00
Yann Collet 9fc7f38e12 added target update_regressionResults
to automate the creation of updated tests/regression/results.csv
2021-12-16 21:46:14 -08:00
Yann Collet 01adddc3e0 update regression results 2021-12-16 20:43:23 -08:00
Yann Collet 7c7b9244d6 update regression results 2021-12-16 16:07:54 -08:00
Yann Collet 47466d2192 Merge branch 'dev' into lazy_rebalance 2021-12-16 14:46:21 -08:00
Yann Collet 9a32492730 updated regression results.csv 2021-12-16 14:39:30 -08:00
Yann Collet 925649b2d0 fixed version number for fast modes 2021-12-16 11:52:43 -08:00
Yann Collet f829c32258 forgot the chainlog is effectively a "fake" value with rowHash
the only value which makes sense is `hashlog-1`
as it mimics the real memory usage.
2021-12-16 11:37:40 -08:00
Yann ColletandGitHub 5c96146db3 Merge pull request #2931 from facebook/fix_rowlog
fixed incorrect rowlog initialization
2021-12-16 09:48:12 -08:00
Yann Collet 5c63096269 updated benchmark for v1.5.1
answers #2764
2021-12-16 04:46:21 -08:00
Yann Collet 8a724f91cb minor changelog update 2021-12-16 01:07:15 -08:00
Yann Collet 7a347769dc minor changelog update 2021-12-15 21:45:30 -08:00
Yann Collet db1b408a2f rebalance lazy compression levels 2021-12-15 21:33:31 -08:00
Yann Collet c8d6067615 fixed incorrect rowlog initialization
the variable has only very limited usage,
being only used once at the beginning of the block for prefetching only,
hence the error had no impact on compression ratio.
2021-12-15 14:37:05 -08:00
Elliot GorokhovskyandGitHub c5f1e826ca Merge pull request #2925 from embg/dict_training_sample_limit_size
Allow user to specify memory limit for dictionary training
2021-12-15 15:58:17 -05:00
Yann Collet 622fee6140 minor changelog update, for clarity 2021-12-15 11:56:11 -08:00
Yann ColletandGitHub eaf786242d Merge pull request #2929 from facebook/sse_row_lazy
simplify SSE implementation of row_lazy match finder
2021-12-15 11:47:15 -08:00
Felix HandteandGitHub d5933a4009 Merge pull request #2930 from nolange/reduce_tables_to_8bit
Reduce tables to 8bit
2021-12-15 12:43:25 -05:00
Norbert Lange 2fbb1d10c1 Reduce bit tables to 8bit
This saves some 1.7Kb in rodata section (x86_64, zstd tool),
while assembler code stays the same except
the type of a few load/extend instructions.

Should not have negative performance implications.
2021-12-14 23:47:57 +01:00
Norbert Lange 99923dfc1a Add typedefs for 8bit (un)signed
To make code more expressive, add U8 and S8 typedefs
2021-12-14 23:47:57 +01:00
binhdvoandGitHub 64205b7832 Fix performance degradation with -m32 (#2926) 2021-12-14 15:53:50 -05:00
Elliot Gorokhovsky 71c0c07c19 Allow user to specify memory limit for dictionary training 2021-12-14 14:29:01 -05:00
Felix HandteandGitHub 5e2fede604 Merge pull request #2921 from felixhandte/neg-lvl-stagger-step
Stagger Stepping in Negative Levels
2021-12-14 14:13:57 -05:00
Yann Collet 05430b25a8 roll SSE implementation of row_lazy match finder
mostly for maintenance convenience.

Performance wise, there is very little change,
slightly faster for slog 3 & 4,
neutral or very slightly negative for slot 5 & 6.
2021-12-14 10:44:23 -08:00
W. Felix Handte 450fca9704 Update Regression Tests w/ New Sizes 2021-12-13 17:29:32 -05:00
W. Felix Handte 82a49c88f9 Increment Step by 1 not 2
I couldn't find a good way to spread `ip0` and `ip1` apart when we accelerate
due to incompressible inputs. (The methods I tried slowed things down quite a
bit.)

Since we aren't splaying ip0 and ip1 apart (which would be like `0_1_2_3_`, as
opposed to the `01__23__` we were actually doing), it's a big ambitious to
increment `step` by 2. Instead, let's increment it by 1, which has the benefit
sliiightly improving compression. Speed remains pretty much unchanged.
2021-12-13 16:59:33 -05:00
Nick TerrellandGitHub 3e2a70b6fb Merge pull request #2905 from 15596858998/dev_1205
add test case
2021-12-13 13:45:23 -08:00
W. Felix Handte 6ca5f42402 Rewrite step to Track Increment Between Pairs of Positions
The position updates are rewritten from `ip[N] = ip[N-1] + step` to be
`ip[N] = ip[N-2] + step`. This lets us only deal with the asymmetric spacing
of gaps at setup and then we only have to keep a single `step` variable.

This seems to work quite well on GCC and Clang!
2021-12-13 14:48:26 -05:00
W. Felix Handte b8434cb754 Allow Templating ZSTD_fast Matchfinders on Acceleration (Lvl < -1) 2021-12-13 14:46:57 -05:00
Felix HandteandGitHub 65404fe14a Merge pull request #2923 from IAL32/patch-1
typo: Small spelling mistake in example
2021-12-13 13:15:21 -05:00