Overview
Comment: | OFMD5Hash: Optimize by making it more readable
This has more resemblance to the implementation of the other hashes, It turns out that Clang generates better code when re-assigning all |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b29adaf0bb1df329fecb9968876f5c66 |
User & Date: | js on 2014-09-03 18:53:24 |
Other Links: | manifest | tags |
Context
2014-09-03
| ||
22:22 | Add OFRIPEMD160Hash check-in: 126d9d3aa1 user: js tags: trunk | |
18:53 | OFMD5Hash: Optimize by making it more readable check-in: b29adaf0bb user: js tags: trunk | |
15:46 | Add OFSHA384Hash and OFSHA512Hash check-in: 23f6c0f84d user: js tags: trunk | |
Changes
Modified src/OFMD5Hash.m from [8c6a093adf] to [38980867ce].
︙ | ︙ | |||
79 80 81 82 83 84 85 | new[0] = state[0]; new[1] = state[1]; new[2] = state[2]; new[3] = state[3]; byteSwapVectorIfBE(buffer, 16); | | | | | < < < < | | | | > > | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | new[0] = state[0]; new[1] = state[1]; new[2] = state[2]; new[3] = state[3]; byteSwapVectorIfBE(buffer, 16); #define LOOP_BODY(f) \ { \ uint32_t tmp = new[3]; \ tmp = new[3]; \ new[0] += f(new[1], new[2], new[3]) + \ buffer[wordOrder[i]] + table[i]; \ new[3] = new[2]; \ new[2] = new[1]; \ new[1] += OF_ROL(new[0], rotateBits[(i % 4) + (i / 16) * 4]); \ new[0] = tmp;\ } for (; i < 16; i++) LOOP_BODY(F) for (; i < 32; i++) LOOP_BODY(G) for (; i < 48; i++) |
︙ | ︙ |