From f3dbd85b2f65b875c26612b6a90c633c405f2584 Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Wed, 10 May 2017 15:34:35 +0300 Subject: [PATCH] Microoptimization --- dotnet/WhiteRabbit.UnmanagedBridge/phraseset.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dotnet/WhiteRabbit.UnmanagedBridge/phraseset.cpp b/dotnet/WhiteRabbit.UnmanagedBridge/phraseset.cpp index 6fdc18c..38f3fcb 100644 --- a/dotnet/WhiteRabbit.UnmanagedBridge/phraseset.cpp +++ b/dotnet/WhiteRabbit.UnmanagedBridge/phraseset.cpp @@ -31,9 +31,8 @@ #define PROCESS_WORD(phraseNumber, wordNumber) \ { \ - auto currentWord = allWordsPointer + wordIndexes[permutation % 16] * 128; \ + auto currentWord = allWordsPointer + wordIndexes[_bextr_u64(permutation, 4 * wordNumber, 4)] * 128; \ phrase = _mm256_xor_si256(phrase, *(__m256i*)(currentWord + cumulativeWordOffset)); \ - permutation >>= 4; \ cumulativeWordOffset += currentWord[127]; \ }