aboutsummaryrefslogtreecommitdiff
path: root/sha256_via.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2011-02-17 01:22:55 -0500
committerJeff Garzik <jgarzik@redhat.com>2011-02-17 01:22:55 -0500
commit1083e15c47539133a0e5075bb3d9f2b7741633f3 (patch)
treedc8a1fbf3098720fd31ba6f33ce36680267cb9e2 /sha256_via.c
parentf0bdc0b6f9f19c603f5e34332fa0d4e5bb3ea973 (diff)
Mark hash success as unlikely, using __builtin_expect() intrinsic
Diffstat (limited to 'sha256_via.c')
-rw-r--r--sha256_via.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha256_via.c b/sha256_via.c
index 39f86a5..186007e 100644
--- a/sha256_via.c
+++ b/sha256_via.c
@@ -57,7 +57,7 @@ bool scanhash_via(unsigned char *data_inout,
stat_ctr++;
- if ((hash32[7] == 0) && fulltest(tmp_hash, target)) {
+ if (unlikely((hash32[7] == 0) && fulltest(tmp_hash, target))) {
/* swap nonce'd data back into original storage area;
* TODO: only swap back the nonce, rather than all data
*/