Danila Kutenin
f6f696553b
Fix minor changes
2026-05-09 18:56:30 +00:00
Danila Kutenin
f50b387b42
Import changes
...
PiperOrigin-RevId: 913030038
2026-05-09 18:53:48 +00:00
Danila Kutenin
368c77c96c
Internal changes
...
PiperOrigin-RevId: 822002697
2026-05-09 18:53:17 +00:00
Danila Kutenin
ec20182d26
zippy: Fix data corruption when compressed output is more than 4GB
...
PiperOrigin-RevId: 741053848
2026-05-09 18:53:07 +00:00
Danila Kutenin
dca57a700f
Internal changes
...
PiperOrigin-RevId: 631425350
2026-05-09 18:52:56 +00:00
Danila Kutenin
aa5f5f8650
Internal change
...
PiperOrigin-RevId: 626960053
2026-05-09 18:52:47 +00:00
Connal de Souza
2ac1356d4d
Optimize ExtractOffset() by avoiding storing the mask.
...
Currently, the constant mask is stored to memory and then immediately read back. Since the read address is often not aligned to the store address, this can cause an expensive Read-after-Write hazard. Although the load is contained entirely within the store, meaning that store forwarding can occur and there are no throughput penalties, there is still a latency penalty. The increased latency matters because of the pointer-chasing pattern in decompression here.
https://godbolt.org/z/e71jhE3bj
PiperOrigin-RevId: 626440765
2026-05-09 18:52:39 +00:00
Danila Kutenin
c6d8c585dd
Internal change
...
PiperOrigin-RevId: 623073126
2026-05-09 18:52:31 +00:00
Danila Kutenin
da1ea96391
Internal change
...
PiperOrigin-RevId: 622802698
2026-05-09 18:52:23 +00:00
Richard O'Grady
e1e7329dc7
Internal changes
...
PiperOrigin-RevId: 621907514
2026-05-09 18:52:12 +00:00
danilak-G
0212163f6e
Merge pull request #234 from anthony-zy/rv_extractoffset
...
RISC-V: Optimize decompression with branchless AdvanceToNextTagRVOptimized +13.7%
2026-05-09 12:22:41 +01:00
anthony-zy
28590427a6
RISC-V: Optimize Snappy decompression tag advance (AdvanceToNextTagRVOptimized) for +4% throughput
2026-04-17 09:59:32 +08:00
郑紫阳10295048
77534271b3
refactor: Align RISC-V implementation with AArch64 branchless mask extraction
2026-04-15 10:33:35 +08:00
Danila Kutenin
cbea40d40c
Fix an unused var warning for RISC-V
2025-10-20 13:34:53 +00:00
anthony-zy
2d6c8f17de
Merge branch 'add_rvv_optmized_memcopy64' of https://github.com/anthony-zy/snappy into add_rvv_optmized_memcopy64
2025-10-20 10:19:39 +08:00
anthony-zy
9cc1596bf6
Merge branch 'add_rvv_optmized_memcopy64' of https://github.com/anthony-zy/snappy into add_rvv_optmized_memcopy64
2025-10-20 09:53:27 +08:00
anthony-zy
6ab5882822
Merge branch 'add_rvv_optmized_memcopy64' of https://github.com/anthony-zy/snappy into add_rvv_optmized_memcopy64
2025-10-17 17:52:35 +08:00
anthony-zy
9fd2b72c77
fix by some comments
2025-10-17 10:28:17 +08:00
anthony-zy
c19d705ee1
Merge branch 'add_rvv_support' of https://github.com/anthony-zy/snappy into add_rvv_support
2025-10-17 10:20:57 +08:00
anthony-zy
c860cabbc5
Merge branch 'google:main' into add_rvv_support
2025-09-12 10:59:56 +08:00
anthony-zy
eb8d19fc1e
Merge branch 'add_rvv_support' of https://github.com/anthony-zy/snappy into add_rvv_support
2025-09-05 15:59:29 +08:00
anthony-zy
802ef73aed
add RVV support and optmized uncompress speed
2025-08-28 20:42:13 +08:00
anthony-zy
1f6ba69d67
add RVV support and optimized uncompress speed
2025-08-28 20:11:39 +08:00
Danila Kutenin
6af9287fbd
Release 1.2.2
2025-03-26 15:19:22 +00:00
Danila Kutenin
fa07e8a945
Fix data corruption when output of snappy compression is more than 4GB
...
This fixes #201
2025-03-26 14:51:54 +00:00
Danila Kutenin
58d911b284
Add missing functional include for std::less_equal
2024-08-17 19:00:51 -07:00
Danila Kutenin
465b5b60ca
Restore old compression functions to preserve ABI
...
Fixes #183
2024-05-21 19:25:53 +00:00
danilak-G
23b3286820
Merge pull request #175 from Quuxplusone/suggest-override
...
Fix -Wsuggest-override warnings from Clang
2024-04-04 20:04:38 +01:00
Danila Kutenin
a60fd602ce
Fix sync
2024-04-04 18:36:37 +00:00
Snappy Team
766d24c95e
Zippy level 2 for denser compression and faster decompression
...
We also increased the hashtable size by 1 bit as it significantly degraded the ratio. Thus even level 1 might slightly improve.
PiperOrigin-RevId: 621456036
2024-04-04 18:27:00 +00:00
Snappy Team
4f5cf9a8d6
Internal changes
...
PiperOrigin-RevId: 599838882
2024-04-04 18:26:53 +00:00
Snappy Team
8bf2640823
Internal changes
...
PiperOrigin-RevId: 599151099
2024-04-04 18:26:42 +00:00
Snappy Team
f0b0c9b8ce
Internal changes
...
PiperOrigin-RevId: 597991348
2024-04-04 18:24:48 +00:00
Snappy Team
54d07d53a2
Restructure compression sampling for comparative analysis
...
PiperOrigin-RevId: 597989810
2024-04-04 18:21:10 +00:00
Howard Hinnant
41a3ade229
Silence -Wdeprecated warning on clang
...
* definition of implicit copy constructor for 'SnappySinkAllocator'
is deprecated because it has a user-declared destructor.
2023-12-31 23:23:37 -05:00
Arthur O'Dwyer
8774875e55
Fix -Wsuggest-override warnings from Clang
2023-12-31 23:21:34 -05:00
Richard O'Grady
27f34a580b
Fix -Wsign-compare warning
...
PiperOrigin-RevId: 547529709
2023-07-12 11:12:48 -07:00
Ilya Tokar
92f18e66fd
Add prefetch to zippy compress
...
PiperOrigin-RevId: 518358512
2023-03-29 17:31:17 -07:00
Snappy Team
9c42b71b19
Optimize check for uncommon decompression for ARM, saving two instructions and three cycles.
...
PiperOrigin-RevId: 517141646
2023-03-29 17:30:58 -07:00
Snappy Team
7b82423c59
The output buffer in DecompressBranchless is never read from and the source buffers are never written. This allows us to defer any writes to the output buffer for an arbitrary amount of time as long as the writes all occur in the proper order. When a MemCopy64 would have normally occurred we save away the source address and length. Once we reach the location of the next write to the output buffer first perform the deferred copy. This gives time for the source address calculation and length to finish before the deferred copy.
...
This change gives 1.84% on CLX and 0.97% Milan.
PiperOrigin-RevId: 504012310
2023-03-07 06:35:00 -08:00
Snappy Team
74960e8bd6
Allow some buffer overwrite on literal emitting
...
Calls to memcpy seem to be quite expensive
```
BM_ZFlat/0 [html (22.24 %) ] 114µs ± 6% 110µs ± 6% -3.97% (p=0.000 n=118+115)
BM_ZFlat/1 [urls (47.84 %) ] 1.63ms ± 5% 1.58ms ± 5% -3.39% (p=0.000 n=117+115)
BM_ZFlat/2 [jpg (99.95 %) ] 7.84µs ± 6% 7.70µs ± 6% -1.66% (p=0.000 n=119+117)
BM_ZFlat/3 [jpg_200 (73.00 %)] 265ns ± 6% 255ns ± 6% -3.48% (p=0.000 n=101+98)
BM_ZFlat/4 [pdf (83.31 %) ] 11.8µs ± 6% 11.6µs ± 6% -2.14% (p=0.000 n=118+116)
BM_ZFlat/5 [html4 (22.52 %) ] 525µs ± 6% 513µs ± 6% -2.36% (p=0.000 n=117+116)
BM_ZFlat/6 [txt1 (57.87 %) ] 494µs ± 5% 480µs ± 6% -2.84% (p=0.000 n=118+116)
BM_ZFlat/7 [txt2 (62.02 %) ] 444µs ± 4% 428µs ± 7% -3.51% (p=0.000 n=119+117)
BM_ZFlat/8 [txt3 (55.17 %) ] 1.34ms ± 5% 1.30ms ± 5% -2.40% (p=0.000 n=120+116)
BM_ZFlat/9 [txt4 (66.41 %) ] 1.84ms ± 5% 1.78ms ± 5% -3.55% (p=0.000 n=110+111)
BM_ZFlat/10 [pb (19.61 %) ] 101µs ± 5% 97µs ± 5% -4.67% (p=0.000 n=118+118)
BM_ZFlat/11 [gaviota (37.73 %)] 368µs ± 5% 360µs ± 6% -2.13% (p=0.000 n=91+90)
BM_ZFlat/12 [cp (48.25 %) ] 38.9µs ± 6% 36.8µs ± 6% -5.36% (p=0.000 n=88+87)
BM_ZFlat/13 [c (42.52 %) ] 13.4µs ± 6% 13.1µs ± 8% -2.38% (p=0.000 n=115+116)
BM_ZFlat/14 [lsp (48.94 %) ] 4.05µs ± 4% 3.94µs ± 4% -2.58% (p=0.000 n=91+85)
BM_ZFlat/15 [xls (41.10 %) ] 1.42ms ± 5% 1.39ms ± 7% -2.49% (p=0.000 n=116+117)
BM_ZFlat/16 [xls_200 (78.00 %)] 313ns ± 6% 307ns ± 5% -1.89% (p=0.000 n=89+84)
BM_ZFlat/17 [bin (18.12 %) ] 518µs ± 5% 506µs ± 5% -2.42% (p=0.000 n=118+116)
BM_ZFlat/18 [bin_200 (7.50 %) ] 86.8ns ± 6% 85.3ns ± 6% -1.76% (p=0.000 n=118+114)
BM_ZFlat/19 [sum (48.99 %) ] 67.9µs ± 4% 61.1µs ± 6% -9.96% (p=0.000 n=114+117)
BM_ZFlat/20 [man (59.45 %) ] 5.64µs ± 6% 5.47µs ± 7% -3.06% (p=0.000 n=117+115)
BM_ZFlatAll [21 kTestDataFiles] 9.23ms ± 4% 9.01ms ± 5% -2.44% (p=0.000 n=80+83)
BM_ZFlatIncreasingTableSize [7 tables ] 30.4µs ± 5% 29.3µs ± 7% -3.45% (p=0.000 n=96+96)
```
PiperOrigin-RevId: 490184133
2023-01-12 13:33:17 +00:00
Ilya Tokar
37f375ddeb
Add prefetch to zippy decompess,
...
PiperOrigin-RevId: 489554313
2023-01-12 13:33:10 +00:00
Snappy Team
15e2a0e13d
Add "cc" clobbers to inline asm that modifies flags.
...
As far as we know, the lack of "cc" in the clobbers hasn't caused
problems yet, but it could. This change is to improve correctness,
and is also almost certainly performance neutral.
PiperOrigin-RevId: 487133620
2023-01-12 13:33:01 +00:00
Snappy Team
8881ba172a
Improve the speed of hashing in zippy compression.
...
This change replaces the hashing function used during compression with
one that is roughly as good but faster. This speeds up compression by
two to a few percent on the Intel-, AMD-, and Arm-based machines we
tested. The amount of compression is roughly unchanged.
PiperOrigin-RevId: 485960303
2023-01-12 13:32:54 +00:00
Snappy Team
a2d219a8a8
Modify MemCopy64 to use AVX 32 byte copies instead of SSE2 16 byte copies on capable x86 platforms. This gives an average speedup of 6.87% on Milan and 1.90% on Skylake.
...
PiperOrigin-RevId: 480370725
2023-01-12 13:32:43 +00:00
Matt Callanan
974fcc49e8
Fix compilation errors under C++11.
...
`std::string::data()` is const-only until C++17.
PiperOrigin-RevId: 479708109
2022-10-08 08:41:35 +02:00
Marcin Kowalczyk
d644ca8770
Fix warnings due to use of __attribute__(always_inline) without inline.
...
PiperOrigin-RevId: 478984028
2022-10-05 10:38:16 +02:00
Matt Callanan
9758c9dfd7
Add snappy::CompressFromIOVec.
...
This reads from an `iovec` array rather than from a `char` array as in `snappy::Compress`.
PiperOrigin-RevId: 476930623
2022-09-29 09:32:28 -07:00
Victor Costan
af720f9a3b
Merge pull request #148 from pitrou:ubsan-ptr-add-overflow
...
PiperOrigin-RevId: 463090354
2022-07-27 15:28:16 +00:00
Marcin Kowalczyk
44caf79086
Move the comment about non-overlap requirement from the implementation to the
...
contract of `MemCopy64()`, and clarify that it applies to `size`, not to 64.
PiperOrigin-RevId: 453920284
2022-07-27 15:28:08 +00:00