From f3a883f00bb2ff32e7c08ab308ed943a0db9fa55 Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 31 Oct 2025 20:25:43 +0100 Subject: [PATCH] md5: raise block buffer size to 64k did some benchmarking and this was more or less the best size in terms of performance, gaining around 20-25 mb/s on my system --- src/md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/md5.c b/src/md5.c index 17b5ca52f..c7c75ddfc 100644 --- a/src/md5.c +++ b/src/md5.c @@ -345,7 +345,7 @@ static void *md5_finish_ctx(struct md5_ctx *ctx, void *resbuf) int md5_stream(FILE *stream, void *resblock) { /* Important: BLOCKSIZE must be a multiple of 64. */ -#define BLOCKSIZE 4096 +#define BLOCKSIZE (64 << 10) struct md5_ctx ctx; char buffer[BLOCKSIZE + 72]; size_t sum = 0;