From: Christian Weisgerber Subject: Re: [PATCH] amd64: import optimized memcmp from FreeBSD To: tech@openbsd.org Date: Sat, 30 Nov 2024 15:59:56 +0100 Christian Schulte: > lately I thought about rewriting those functions to use simd, but never > looked further into doing it, because I do not know if simd > registers/instructions could be used there at all. Could they? Instead Presumably not in the kernel as we would have to save/restore FPU/SIMD registers around those calls. > of working on the same thing every now and then, I would be in favour of > providing routines using the most performant instructions the > architecture has to offer (simd), if possible, and be done with it. > Would not mind writing those, if they would be accepted. FreeBSD already did all that work recently. https://freebsdfoundation.org/blog/a-sneak-peek-simd-enhanced-string-functions-for-amd64/ -- Christian "naddy" Weisgerber naddy@mips.inka.de