mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Raise example/zcat's buffer size from 16K to 128K
This matches the 128K buffer size (ZSTD_DStreamOutSize returns ZSTD_BLOCKSIZE_MAX, defined to be 1<<17 in https://github.com/facebook/zstd/blob/dev/lib/zstd.h) as shipped as /usr/bin/zstdcat on Debian. Decoding a 156 MiB gzipped file: $ /usr/bin/time ./gen/bin/example-zcat < linux-4.20.4.tar.gz > /dev/null Before: 2.14user 0.13system 0:02.28elapsed 100%CPU (0avgtext+0avgdata 1076maxresident)k 0inputs+0outputs (0major+75minor)pagefaults 0swaps After: 2.03user 0.05system 0:02.09elapsed 99%CPU (0avgtext+0avgdata 1460maxresident)k 0inputs+0outputs (0major+135minor)pagefaults 0swaps Before/After elapsed ratio: 2.28 / 2.09 = 1.09.
This commit is contained in:
1 parent
89fef4cf5f
commit
a27b24099e
1 file changed
+2
-2
+2
-2
@@ -60,11 +60,11 @@ for a C compiler $CC, such as clang or gcc.
|
||||
#endif
|
||||
|
||||
#ifndef DST_BUFFER_SIZE
|
||||
#define DST_BUFFER_SIZE (16 * 1024)
|
||||
#define DST_BUFFER_SIZE (128 * 1024)
|
||||
#endif
|
||||
|
||||
#ifndef SRC_BUFFER_SIZE
|
||||
#define SRC_BUFFER_SIZE (16 * 1024)
|
||||
#define SRC_BUFFER_SIZE (128 * 1024)
|
||||
#endif
|
||||
|
||||
uint8_t dst_buffer[DST_BUFFER_SIZE];
|
||||
|
||||
Reference in new issue
Block a user