From 159634388902b8e4948b5c513072264acb70d42c Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Sun, 31 Mar 2024 18:13:16 +1100 Subject: [PATCH] example/mzcat: embiggen static array buffers $ time example-mzcat < linux-6.8.2.tar.xz > /dev/null Before: user 0m8.392s After: user 0m8.122s --- example/mzcat/mzcat.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/example/mzcat/mzcat.c b/example/mzcat/mzcat.c index ab5afc83..c622da05 100644 --- a/example/mzcat/mzcat.c +++ b/example/mzcat/mzcat.c @@ -84,15 +84,16 @@ Supported compression formats: #endif #ifndef DST_BUFFER_ARRAY_SIZE -#define DST_BUFFER_ARRAY_SIZE (128 * 1024) +#define DST_BUFFER_ARRAY_SIZE (64 * 1024 * 1024) #endif #ifndef SRC_BUFFER_ARRAY_SIZE -#define SRC_BUFFER_ARRAY_SIZE (128 * 1024) +#define SRC_BUFFER_ARRAY_SIZE (64 * 1024 * 1024) #endif +// 80 MiB is big enough to decode files encoded with "xz -9". #ifndef WORKBUF_ARRAY_SIZE -#define WORKBUF_ARRAY_SIZE (64 * 1024 * 1024) +#define WORKBUF_ARRAY_SIZE (80 * 1024 * 1024) #endif uint8_t g_dst_buffer_array[DST_BUFFER_ARRAY_SIZE];