Benchmarking: benchdata/northwind.mdf
snappy: Compressed 2752512 bytes into 726437 (26.4%) at 653.0 MiB/s
QuickLZ: Compressed 2752512 bytes into 620933 (22.6%) at 456.8 MiB/s
Benchmarking: benchdata/gdb.exe
snappy: Compressed 8872609 bytes into 4530844 (51.1%) at 333.1 MiB/s
QuickLZ: Compressed 8872609 bytes into 4056279 (45.7%) at 267.6 MiB/s
Benchmarking: benchdata/pic.bmp
snappy: Compressed 18108198 bytes into 16561772 (91.5%) at 292.5 MiB/s
QuickLZ: Compressed 18108198 bytes into 15784615 (87.2%) at 197.2 MiB/s
Benchmarking: benchdata/plaintext.txt
snappy: Compressed 2988604 bytes into 1657747 (55.5%) at 289.4 MiB/s
QuickLZ: Compressed 2988604 bytes into 1436646 (48.1%) at 238.5 MiB/s
Benchmarking: benchdata/proteins.txt
snappy: Compressed 7344249 bytes into 2964303 (40.4%) at 371.6 MiB/s
QuickLZ: Compressed 7344249 bytes into 2586659 (35.2%) at 321.9 MiB/s
I work at Google, and I've been working on the Snappy open-sourcing. First of all, let me state that when doing our benchmarks, we were definitely comparing against the latest public version (1.5.0) of QuickLZ. I'm having problems reproducing your benchmark results; could you provide some more details about the exact settings, compiler version, architecture etc.? I can't even get all of the compression ratios to match up exactly with the ones I'm seeing, so there must be some sort of difference between the setups. Are you perchance running Snappy with assertions enabled? (The microbenchmark will complain if you do, so it's easy to check.)
For what it's worth, I ran the QuickLZ test suite on my own machine (you can see the exact testing environment below), and got quite different results:
In addition, there's one nearly-incompressible file listed on the same page, which I also ran on (it's not included in the averages above): This is on a Nehalem 2.27GHz, running Debian GNU/Linux 6.0 in 64-bit mode, GCC version 4.4.5, with flags -O2 -g -DNDEBUG for both Snappy (1.0.0) and QuickLZ (1.5.0), running snappy_unittest to compare. QuickLZ was left at the default settings, ie. the files were exactly as downloaded from http://www.quicklz.com/quicklz.[ch] as of today. In particular, this means QuickLZ was running in unsafe mode, which means it could crash on corrupted compressed input. (Safe mode, which is comparable to how Snappy runs, is, according to http://www.quicklz.com/download.html, 15–20% slower at decompression, so the difference would be bigger.)Exact benchmark results will, as always, vary with differing compiler, set of flags, CPU, and data set. The average numbers from this benchmark, however, show QuickLZ 1.5.0 (in unsafe mode) compressing about 11% more densely than Snappy 1.0.0 does, but Snappy compressing about 32% faster and decompressing about 153% faster (ie., about 2.53 times as fast).
/* Steinar */