diff options
author | Jeff Garzik <jeff@garzik.org> | 2011-02-17 01:22:55 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2011-02-17 01:22:55 -0500 |
commit | 1083e15c47539133a0e5075bb3d9f2b7741633f3 (patch) | |
tree | dc8a1fbf3098720fd31ba6f33ce36680267cb9e2 /miner.h | |
parent | f0bdc0b6f9f19c603f5e34332fa0d4e5bb3ea973 (diff) |
Mark hash success as unlikely, using __builtin_expect() intrinsic
Diffstat (limited to 'miner.h')
-rw-r--r-- | miner.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -21,6 +21,14 @@ #include <byteswap.h> #endif +#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__) +#undef unlikely +#define unlikely(expr) (__builtin_expect((expr), 0)) +#else +#undef unlikely +#define unlikely(expr) (expr) +#endif + #if defined(__i386__) #define WANT_CRYPTOPP_ASM32 #endif |