Optimize ZSTDCodec::doUncompress()
authorNick Terrell <terrelln@fb.com>
Fri, 24 Mar 2017 19:18:57 +0000 (12:18 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 24 Mar 2017 19:21:52 +0000 (12:21 -0700)
commit0659842527913025d998860811fe135cc6170044
tree82929561679d109fdfd424398e859a0e3da56dee
parentcca8b5c3bbaa204e56384720a3b1a0f8280fb54b
Optimize ZSTDCodec::doUncompress()

Summary:
It is ~10% faster to call `ZSTD_decompress()` than use the
streaming API. The streaming API does some extra `memcpy`s that we
can avoid. We are working on improving the speed of the streaming
API in the case where all the data can be processed in one shot,
but that won't be available in the stable ZSTD api for a few versions.

Reviewed By: yfeldblum

Differential Revision: D4731058

fbshipit-source-id: 39026c499c0f5002466097b5afe7e30f850e0ae8
folly/io/Compression.cpp
folly/io/test/CompressionTest.cpp