From 0f0daf1a917d527748e57ac320a52fd2f00b3335 Mon Sep 17 00:00:00 2001 From: sigsegv7 Date: Mon, 18 Sep 2023 01:18:23 -0400 Subject: Shift step left by 1 if SSE is supported This is a faster way of increasing the step as they are in powers of two. Signed-off-by: sigsegv7 --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index 1b023fc..259b294 100644 --- a/src/main.c +++ b/src/main.c @@ -142,7 +142,7 @@ encrypt(const struct cpu_info *info, char *buf, size_t buf_size) #if defined(__x86_64__) if (info->has_sse2 || info->has_sse3) { - step += 8; /* Start at 128 bits */ + step <<= 1; /* Start at 16 bytes (128 bits) */ } #endif /* defined(__x86_64__) */ -- cgit v1.2.3