From 1f9e16f63e93159fa789c58beb4dc21d460e57a5 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 13 Sep 2019 09:37:09 -0700 Subject: [PATCH] AES optimization rabbit hole --- node/AES-aesni.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/node/AES-aesni.c b/node/AES-aesni.c index 2d808b97b..a5fc81e6d 100644 --- a/node/AES-aesni.c +++ b/node/AES-aesni.c @@ -11,6 +11,11 @@ */ /****/ +/* This is done in plain C because the compiler (at least GCC and CLANG) seem + * to do a *slightly* better job optimizing this intrinsic code when compiling + * plain C. C also gives us the register hint keyword, which seems to actually + * make a small difference. */ + #if (defined(__amd64) || defined(__amd64__) || defined(__x86_64) || defined(__x86_64__) || defined(__AMD64) || defined(__AMD64__) || defined(_M_X64)) #include