From 352f22f8f6bb0a742b5ff429ba9282582d9030c0 Mon Sep 17 00:00:00 2001 From: dzaima Date: Thu, 4 Jul 2024 21:52:56 +0300 Subject: [PATCH] don't vectorize tiny loop could theoretically maybe be beneficial for functions with a hilarious number of arguments, but whatever. Improves perf on few-argument functions from not unrolling/vectorizing. --- src/ffi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ffi.c b/src/ffi.c index 7acc38f6..482ca2b2 100644 --- a/src/ffi.c +++ b/src/ffi.c @@ -940,7 +940,7 @@ B libffiFn_c2(B t, B w, B x) { genObj(e.o, o, tmpAlloc + e.staticOffset, &ffiObjs); } - for (usz i = 0; i < argn; i++) argPtrs[i] = tmpAlloc + ents[i+1].staticOffset; + PLAINLOOP for (usz i = 0; i < argn; i++) argPtrs[i] = tmpAlloc + ents[i+1].staticOffset; void* res = tmpAlloc + ents[0].staticOffset; // for (usz i = 0; i < argObj->staticAllocTotal; i++) { // simple hexdump of the allocation