This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/snappy_unittest.cc b/snappy_unittest.cc | |
index fcb3261..dc473a3 100644 | |
--- a/snappy_unittest.cc | |
+++ b/snappy_unittest.cc | |
@@ -47,11 +47,11 @@ DEFINE_int32(end_len, -1, | |
DEFINE_int32(bytes, 10485760, | |
"How many bytes to compress/uncompress per file for timing"); | |
-DEFINE_bool(zlib, false, | |
+DEFINE_bool(zlib, true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Speed up inflate_fast by up to 1.5x on x86_64. | |
https://github.com/google/snappy is an unrelated compression format but | |
its snappy_unittest program is able to benchmark the snappy library and | |
the zlib library. We can re-purpose it, via LD_LIBRARY_PATH, to measure | |
different versions of zlib, such as before / after this commit. | |
snappy_unittest's output looks like: | |
testdata/alice29.txt : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- inffast.c 2017-08-25 12:05:02.309161736 +1000 | |
+++ contrib/inffast64/inffast64.c 2017-08-25 12:09:05.504252162 +1000 | |
@@ -11,8 +11,11 @@ | |
#ifdef ASMINF | |
# pragma message("Assembler code may have bugs -- use at your own risk") | |
#elif INFLATE_FAST64 | |
-/* Skip this implementation; use contrib/inffast64/inffast64.c instead. */ | |
-#else | |
+ | |
+#if defined(ZLIB_INTERNAL_HAVE_64_BIT_UNALIGNED_LOADS) || \ |