diff options
author | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2011-12-23 22:38:36 +0200 |
---|---|---|
committer | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2011-12-23 22:38:36 +0200 |
commit | 9a49455c492594532fcb773a53fde5b77ea10eb4 (patch) | |
tree | 63b32387c2669d095f2cbb1bd0482da50472f86c | |
parent | bd44eb15e08c62f71837cdc5e7f7f92082664da6 (diff) |
Use uint64_t in blkcpy/blkxor (good even for 32-bit systems)
Cell PPU (32-bit), 3.2GHz:
0.58 khash/sec -> 0.65 khash/sec
MIPS 24K, 680MHz:
0.19 khash/sec -> 0.20 khash/sec
-rw-r--r-- | scrypt.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -475,9 +475,9 @@ static void smix(uint8_t *, size_t, uint64_t, uint32_t *, uint32_t *); static void blkcpy(void * dest, void * src, size_t len) { - size_t * D = dest; - size_t * S = src; - size_t L = len / sizeof(size_t); + uint64_t * D = dest; + uint64_t * S = src; + size_t L = len / sizeof(uint64_t); size_t i; for (i = 0; i < L; i++) @@ -487,9 +487,9 @@ blkcpy(void * dest, void * src, size_t len) static void blkxor(void * dest, void * src, size_t len) { - size_t * D = dest; - size_t * S = src; - size_t L = len / sizeof(size_t); + uint64_t * D = dest; + uint64_t * S = src; + size_t L = len / sizeof(uint64_t); size_t i; for (i = 0; i < L; i++) |