Nick Terrell
5d9fb47850
[linux] Opt out of row based match finder for the kernel
...
The row based match finder is slower without SIMD. We used to detect the
presence of SIMD to set the lower bound to 17, but that breaks
determinism. Instead, specifically opt into it for the kernel, because
it is one of the rare cases that doesn't have SIMD support.
2025-03-11 12:54:22 -07:00
Yann Collet
d2c562b803
update hrlog comment
2025-02-10 10:48:56 -08:00
Yann Collet
67fad95f79
derive hashratelog from hashlog when only hashlog is set
2025-02-10 10:46:37 -08:00
Yann Collet and Yann Collet
09d7e34ed8
adjust mml
2025-02-10 10:46:37 -08:00
Yann Collet and Yann Collet
d5e4698267
fix boundary condition
2025-02-10 10:46:37 -08:00
Yann Collet and Yann Collet
72406b71c3
update hrlog rule to favor compression ratio a bit more at low levels
2025-02-10 10:46:37 -08:00
Yann Collet and Yann Collet
f26cc54f37
dynamic bucket sizes
2025-02-10 10:46:37 -08:00
Yann Collet and Yann Collet
4609a40b89
dynamically adjust hratelog and ldmml based on strategy
2025-02-10 10:46:37 -08:00
Yann Collet
23e5f80390
Revert "pass dictionary loading method as parameter"
...
This reverts commit 821fc567f93a415e9fbe856271ccd452ee7acf07.
2025-02-05 18:47:26 -08:00
Yann Collet
c7cd7dc04b
better MT fluidity
...
--patch-from no longer blocked on first job dictionary loading
2025-02-05 18:42:00 -08:00
Yann Collet
f11bd19c7f
ensure cdict is properly reset to NULL
2025-02-05 18:42:00 -08:00
Yann Collet
7406d2b6eb
skips the need to create a temporary cdict for --patch-from
...
thus saving a bit of memory and a little bit of cpu time
2025-02-05 18:42:00 -08:00
Yann Collet
220abe6da8
reduced memory usage
...
by avoiding to duplicate in memory
a dictionary that was passed by reference.
2025-02-05 18:42:00 -08:00
Yann Collet
85a44b233a
always free .cdictLocal
2025-02-05 18:41:59 -08:00
Yann Collet
e637fc64c5
update type naming convention
2025-02-05 18:41:59 -08:00
Yann Collet
34ba14437a
minor boundary change
...
improves compression ratio at low levels
2025-02-05 18:41:59 -08:00
Yann Collet
ffa66a6971
fix speed of --patch-from at high compression mode
2025-02-05 18:41:59 -08:00
Yann Collet
e117d79e22
fix minor alignment warning
2025-02-05 16:13:58 -08:00
Yann Collet
c39424ea87
fix minor alignment warning
...
this is a prototype definition error:
`_mm_storeu_si128()` should accept a `void*` pointer,
since it explicitly states that it accepts unaligned addresses
yet requiring a `__m128i*` tells otherwise, and requires the compiler the enforce this alignment.
2025-02-05 16:11:54 -08:00
Yann Collet
32dff04d32
fix one minor alignment warning
...
seems like a prototype interface error:
input parameter should have been `const void*`,
since the documentation is explicit that input doesn't have to be aligned,
but `const __m256i*` makes the compiler enforce it.
2025-02-05 15:46:44 -08:00
Yann Collet
54e9d46db4
added __clang__ to compiler-specific alignment attribute
...
when clang is used within msvc, `__GNUC__` isn't defined,
so testing `__clang__` explicitly is required.
2025-02-05 13:48:24 -08:00
Yann Collet
bcf404c0ab
changed C11 keyword to _Alignas
...
so that it doesn't depend on #include
2025-02-05 13:25:14 -08:00
Yann Collet and GitHub
26a2b5d5df
Merge pull request #4265 from pps83/static-bmi2-check
...
Check `STATIC_BMI2` instead of `STATIC_BMI2 == 1`
2025-01-31 14:39:20 -08:00
Yann Collet and GitHub
283fbd2dca
Merge pull request #4264 from pps83/dev-static-bmi2
...
Move STATIC_BMI2 define to portability_macros.h
2025-01-30 11:11:51 -08:00
Pavel P
0cda0100ea
fix formatting
2025-01-24 03:03:22 +02:00
Pavel P
f7e8fc339b
Check STATIC_BMI2 instead of STATIC_BMI2 == 1
2025-01-24 03:03:21 +02:00
Pavel P
0a183620a3
Reorder __BMI2__ check
...
+ if `__BMI2__` defined, then set STATIC_BMI2 for all compilers
+ use `defined(_MSC_VER) && defined(__AVX2__)` as fallback for ms compiler
2025-01-24 03:02:47 +02:00
Pavel P
d486ccc9e9
Update comment for STATIC_BMI2 macro
2025-01-24 03:02:47 +02:00
Pavel P
1b15e888fc
Move STATIC_BMI2 block as-is to portability_macros.h
2025-01-24 03:02:46 +02:00
Pavel P
59afb28c97
Remove unused ZSTD_decompressSequences_t typedef
2025-01-24 02:13:20 +02:00
Pavel P
1204626138
Check DYNAMIC_BMI2 instead of DYNAMIC_BMI2 != 0
...
`#if DYNAMIC_BMI2` is consistent with the rest of the code.
+ use spaces instead of tabs
2025-01-23 23:59:38 +02:00
Yann Collet and GitHub
a7b59bcb7f
Merge pull request #4257 from pps83/dev-x64test
...
Use _M_X64 only without mixing with _M_AMD64
2025-01-23 12:50:27 -08:00
Yann Collet and GitHub
55c0c5bdca
Merge pull request #4258 from pps83/dev-ZSTD_ALIGNED
...
Implement ZSTD_ALIGNED for ms compiler
2025-01-22 15:09:35 -08:00
Pavel P
a0872a8372
Implement ZSTD_ALIGNED for ms compiler
2025-01-21 02:33:25 +02:00
Pavel P
6c1d1cc600
Use _M_X64 only without mixing with _M_AMD64
2025-01-21 02:27:39 +02:00
Yann Collet and GitHub
48b186f76b
Merge pull request #4253 from facebook/BitContainerType
...
minor: use BitContainerType when appropriate
2025-01-19 18:35:36 -08:00
Yann Collet
82346b92bb
minor: generalize BitContainerType
...
technically equivalent to `size_t`,
but it's the proper type for underlying register representation.
This makes it possible to control register type, and therefore size, independently from `size_t`,
which can be useful on systems where `size_t` is 32-bit, while the architecture supports 64-bit registers.
2025-01-19 18:05:57 -08:00
Yann Collet
4bbf4a285d
enable DYNAMIC_BMI2 by default on x86 (32-bit mode)
...
so far was only enabled for x64 (64-bit mode)
2025-01-19 08:11:59 -08:00
Yann Collet
a556559841
no longer limit automated BMI2 detection to x64
...
this was previously no triggered in x86 32-bit mode,
due to a limitation in `bitstream.h`, that was fixed in #4248 .
Now, `bmi2` will be automatically detected and triggered
at compilation time, if the corresponding instruction set is enabled,
even in 32-bit mode.
Also: updated library documentation, to feature STATIC_BMI2 build variable
2025-01-19 00:08:57 -08:00
Yann Collet
27d7940631
minor: cosmetic, indentation
2025-01-18 22:49:16 -08:00
Yann Collet
f0b5f65bca
fixed minor static function declaration issue
...
in AVX2 mode only
2025-01-18 22:49:16 -08:00
Yann Collet
9efb09749b
added a CI test for x86 32-bit + avx2 combination
...
which is expected to be quite rare, but nonetheless possible.
This test is initially expected to fail, before integration of #4248 fix
2025-01-18 22:49:16 -08:00
Yann Collet and GitHub
a469e7c083
Merge pull request #4248 from pps83/dev-bzhi32
...
Use _bzhi_u32 for 32-bit builds when building with STATIC_BMI2
2025-01-18 22:48:24 -08:00
Yann Collet and GitHub
167b00495d
Merge pull request #4246 from pps83/dev-asmx64-win
...
[asm] Enable x86_64 asm for windows builds
2025-01-18 20:03:16 -08:00
Pavel P
fcd684b9b4
update sizeof check
2025-01-19 02:37:35 +02:00
Pavel P
d60c4d75e9
remove unrelated changes
2025-01-19 02:36:00 +02:00
Pavel P
462484d5dc
change to BitContainerType
2025-01-19 02:34:41 +02:00
Pavel P
26e5fb3614
handle 32bit size_t when building for x64
2025-01-18 23:37:50 +02:00
Pavel P
936927a427
handle 32bit size_t when building for x64
2025-01-18 23:30:55 +02:00
Yann Collet
e8de8085f4
minor: assert that state is not null
...
replaces #4016
2025-01-18 13:08:04 -08:00