summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update contributing guidelines.masterVictor Costan2022-01-122-24/+35
| | | | | | | * Align CONTRIBUTING.md with the google/new-project template. * Explain the support story for the CMake config. PiperOrigin-RevId: 421311695
* Pass by reference the first argument of ExtractLowBytesSnappy Team2021-11-141-1/+1
| | | | | | to avoid UB of passing uninitialized argument by value. PiperOrigin-RevId: 406052814
* Switch CI to GitHub Actions.Victor Costan2021-09-014-148/+136
| | | | PiperOrigin-RevId: 394247182
* Merge pull request #140 from JunHe77:advVictor Costan2021-08-311-4/+8
|\ | | | | | | PiperOrigin-RevId: 394061345
| * decompress: refine data depdencyJun He2021-08-301-4/+8
|/ | | | | | | | | | | | | The final ip advance value doesn't have to wait for the result of offset to load *tag. It can be computed along with the offset, so the codegen will use one csinc in parallel with ldrb. This will improve the throughput. With this change it is observed ~4.2% uplift in UFlat/10 and ~3.7% in UFlatMedley Signed-off-by: Jun He <jun.he@arm.com> Change-Id: I20ab211235bbf578c6c978f2bbd9160a49e920da
* Merge pull request #133 from JunHe77:simdVictor Costan2021-08-303-2/+31
|\ | | | | | | PiperOrigin-RevId: 393681630
| * Add config and header file for NEON supportJun He2021-08-122-0/+12
| | | | | | | | | | Signed-off-by: Jun He <jun.he@arm.com> Change-Id: I3fade568ff92b4303387705f843d0051d5e88349
| * Fix SSE3 and BMI2 compile errorJun He2021-08-122-23/+33
| | | | | | | | | | | | | | | | | | After SHUFFLE code blocks are refactored, "tmmintrin.h" is missed, and bmi2 code part will have build failure as type conflicts. Signed-off-by: Jun He <jun.he@arm.com> Change-Id: I7800cd7e050f4d349e5a227206b14b9c566e547f
* | Migrate feature detection macro checks from #ifdef to #if.Victor Costan2021-08-167-43/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | The #if predicate evaluates to false if the macro is undefined, or defined to 0. #ifdef (and its synonym #if defined) evaluates to false only if the macro is undefined. The new setup allows differentiating between setting a macro to 0 (to express that the capability definitely does not exist / should not be used) and leaving a macro undefined (to express not knowing whether a capability exists / not caring if a capability is used). PiperOrigin-RevId: 391094241
* | Add baseline CPU level to Travis CI.Victor Costan2021-08-161-4/+13
| | | | | | | | PiperOrigin-RevId: 391082698
* | Merge pull request #135 from JunHe77:remove_extraVictor Costan2021-08-141-0/+9
|\ \ | | | | | | | | | PiperOrigin-RevId: 390767998
| * | decompress: add hint to remove extra ANDJun He2021-08-121-0/+9
| |/ | | | | | | | | | | | | | | | | | | Clang doesn't realize the load with free zero-extension, and emits another extra 'and xn, xm, 0xff' to calc offset. With this change ,this extra op is removed, and consistent 1.7% performance uplift is observed. Signed-off-by: Jun He <jun.he@arm.com> Change-Id: Ica4617852c4b93eadc6c5c551dc3961ffbadb8f0
* | Merge pull request #136 from JunHe77:ext_armVictor Costan2021-08-131-0/+4
|\ \ | |/ |/| | | PiperOrigin-RevId: 390715690
| * decompression: optimize ExtractOffset for ArmJun He2021-08-061-0/+3
|/ | | | | | | | | | | Inspired by kExtractMasksCombined, this patch uses shift to replace table lookup. On Arm the codegen is 2 shift ops (lsl+lsr). Comparing to previous ldr which requires 4 cycles latency, the lsl+lsr only need 2 cycles. Slight (~0.3%) uplift observed on N1, and ~3% on A72. Signed-off-by: Jun He <jun.he@arm.com> Change-Id: I5b53632d22d9e5cf1a49d0c5cdd16265a15de23b
* Move the extract masks variable out in zippy. I see a consistent 1.5-2% ↵Snappy Team2021-08-021-9/+18
| | | | | | improvement for ARM. Probably because ARM has more relaxed address computation than x86 https://www.godbolt.org/z/bfM1ezx41. I don't think this is a compiler bug or it can do something about it PiperOrigin-RevId: 387569896
* Remove inline assembly as the bug in clang was fixedSnappy Team2021-08-021-16/+0
| | | | PiperOrigin-RevId: 387356237
* Optimize memset to pure SIMD because compilers generate consistently bad ↵Snappy Team2021-08-022-1/+15
| | | | | | code. clang for ARM and gcc for x86 https://gcc.godbolt.org/z/oxeGG7aEx PiperOrigin-RevId: 383467656
* Optimize tag extraction for ARM with conditional increment instruction ↵Snappy Team2021-07-051-2/+25
| | | | | | generation (csinc). For codegen see https://gcc.godbolt.org/z/a8z9j95Pv PiperOrigin-RevId: 382688740
* Enable vector byte shuffle optimizations on ARM NEONatdt2021-07-052-59/+99
| | | | | | The SSSE3 intrinsics we use have their direct analogues in NEON, so making this optimization portable requires a very thin translation layer. PiperOrigin-RevId: 381280165
* Update Travis CI config.Victor Costan2021-05-251-9/+9
| | | | | | | Xcode (drives macOS image) : 12.2 => 12.5 Clang : 10 => 12 GCC : 10 => 11 PiperOrigin-RevId: 375610083
* Clarify, in a comment, that offset/256 fits in 3 bits. It has to in this ↵Snappy Team2021-05-251-1/+1
| | | | | | context, because the other 5 bits in the byte are used for len-4 and the tag. PiperOrigin-RevId: 374926553
* Tag open source release 1.1.9.1.1.9Victor Costan2021-05-042-2/+2
| | | | PiperOrigin-RevId: 372007801
* 'size' remains unused if none of ZLIB, LZO and LZ4 are available.atdt2021-04-221-2/+4
| | | | | | While we're here, take care of a couple of lint warnings by converting CHECK(a != b) to CHECK_NE(a, b). PiperOrigin-RevId: 369132446
* Add project goals to CONTRIBUTING.md.Chris Mumford2021-03-121-0/+20
| | | | PiperOrigin-RevId: 362386747
* Add stubs for abseil flags.Victor Costan2021-03-087-70/+42
| | | | | | | This CL also removes support for using the gflags library to modify the flags. PiperOrigin-RevId: 361583626
* Remove unused run_microbenchmarks flag.Victor Costan2021-03-081-3/+0
| | | | PiperOrigin-RevId: 361582956
* Add absl::GetFlag and absl::SetFlag to uses of flags.Snappy Team2021-02-172-14/+18
| | | | PiperOrigin-RevId: 357807059
* Add AppVeyor status badge.Victor Costan2020-12-161-0/+1
| | | | PiperOrigin-RevId: 347861379
* Remove unused include in snappy_benchmark.cc.Victor Costan2020-12-161-2/+3
| | | | PiperOrigin-RevId: 347861229
* Split benchmarks and test tools into separate targets.Victor Costan2020-12-1610-1062/+1350
| | | | | | | | This lets us remove main() from snappy_bench.cc and snappy_unittest.cc, which simplifies integrating these tests and benchmarks with other suites. PiperOrigin-RevId: 347857427
* Merge pull request #117 from cmumford:disable-osx-fuzzerVictor Costan2020-12-161-1/+2
|\ | | | | | | PiperOrigin-RevId: 347736844
| * Disable fuzzing on OSX.Chris Mumford2020-12-151-1/+2
| | | | | | | | | | | | | | | | | | | | LibFuzzer does not ship with the Mac OSX Command Line Tools. ``` ld: file not found: /Applications/Xcode-12.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin/libclang_rt.fuzzer_osx.a clang: error: linker command failed with exit code 1 (use -v to see invocation) ```
* | Test stub improvements.Victor Costan2020-12-162-112/+102
|/ | | | PiperOrigin-RevId: 347736380
* Fixup for adding the third_party/{benchmark, googletest} submodules. (#115)Victor Costan2020-12-152-0/+0
|
* Merge pull request #114 from cmumford:werror-only-clangVictor Costan2020-12-153-370/+372
|\ | | | | | | PiperOrigin-RevId: 347660305
| * Fixed endif clause.Chris Mumford2020-12-151-1/+1
| |
| * Matching clang.Chris Mumford2020-12-151-2/+1
| |
| * Building with `-Werror` only with clang.Chris Mumford2020-12-151-4/+7
|/ | | | | | | | | | | | | | | gcc was unable to inline a function call, which caused a build failure due to `-Wall -Werror`. The build error was: ``` ../snappy.cc:292:76: error: ignoring attributes on template argument ‘__m128i’ [-Werror=ignored-attributes] 292 | static inline std::pair<__m128i /* pattern */, __m128i /* reshuffle_mask */> | ^ ../snappy.cc:292:76: error: ignoring attributes on template argument ‘__m128i’ [-Werror=ignored-attributes] cc1plus: all warnings being treated as errors ```
* Fix CHECK_EQ to call ok() instead of CheckSuccess().Chris Mumford2020-12-152-2/+2
| | | | | | CheckSuccess was removed in e1e91ee464373e0bba4aadfbd3d88a6d84dc5b95. PiperOrigin-RevId: 347625874
* Fixup for adding the third_party/{benchmark, googletest} submodules. (#111)Victor Costan2020-12-152-0/+0
|
* Rework file:: stubs.Victor Costan2020-12-152-49/+92
| | | | PiperOrigin-RevId: 347541488
* Wrap snappy_unittest in an anonymous namespace and remove static from functions.Victor Costan2020-12-153-31/+25
| | | | PiperOrigin-RevId: 347541028
* Fixup for adding the third_party/{benchmark, googletest} submodules. (#110)Victor Costan2020-12-142-0/+0
|
* Fix unused local variable warnings.Victor Costan2020-12-151-2/+14
| | | | | | This will not change the compilation output. PiperOrigin-RevId: 347525836
* Remove custom testing and benchmarking code.Victor Costan2020-12-147-433/+154
| | | | | | | | | | | | | | | | | | | | | Snappy includes a testing framework, which implements a subset of the Google Test API, and can be used when Google Test is not available. Snappy also includes a micro-benchmark framework, which implements an old version of the Google Benchmark API. This CL replaces the custom test and micro-benchmark frameworks with google/googletest and google/benchmark. The code is vendored in third_party/ via git submodules. The setup is similar to google/crc32c and google/leveldb. This CL also updates the benchmarking code to the modern Google Benchmark API. Benchmark results are expected to be more precise, as the old framework ran each benchmark with a fixed number of iterations, whereas Google Benchmark keeps iterating until the noise is low. PiperOrigin-RevId: 347456142
* Add Travis-CI build status badge to README.md.Chris Mumford2020-12-141-0/+1
| | | | PiperOrigin-RevId: 347402877
* Update Travis CI config.Victor Costan2020-12-141-5/+5
| | | | PiperOrigin-RevId: 347397797
* Replace #pragma nounroll with equivalent used elsewhere.Victor Costan2020-12-141-2/+6
| | | | PiperOrigin-RevId: 347341130
* Remove inline qualifier from static variables.Victor Costan2020-12-141-4/+4
| | | | | | This feature requires C++17. Fortunately, inline is useful for header declarations, which may be included in multiple compilation units. The declarations modified by this CL occur in a single compilation unit. PiperOrigin-RevId: 347338760
* 1) Improve the lookup table data to require less instructions to extract the ↵Snappy Team2020-12-142-126/+188
| | | | | | | | | necessary data. We now store len - offset in a signed int16, this happens to remove masking offset in the calculations and the calculations that need to be done precisely give the flags that we need for testing correctness. 2) Replace offset extraction with a lookup mask. This is less uops and is needed because we need to special case type 3 to always return 0 as to properly trigger the fallback. 3) Unroll the loop twice, this removes some loop-condition checks AND it improves the generated assembly. The loop variables tend to end up in a different register requiring mov's having two consecutive copies allows the elision of the mov's. PiperOrigin-RevId: 346663328