|
|
Message-Id: <857BE162-C4D1-477B-88BA-27797795E625@gmail.com>
Date: Mon, 4 May 2015 17:26:41 +0800
From: Lei Zhang <zhanglei.april@...il.com>
To: john-dev@...ts.openwall.com
Subject: Adding OpenMP support to SunMD5
Hi,
I'm trying to add OpenMP support to SunMD5. Currently I'm looking at the biggest loop in crypt_all(), which has the form:
for (round = 0; round < maxrounds; round++)
{ ... }
It seems to me this loop has loop-carried dependence, thus not feasible for direct parallelizing. I viewed the crypt() function of some other formats, whose hotspot loops mostly have this form:
for (index = 0; index < count; index++)
{ ... }
Loops like this are easy to parallelize, since each iteration is independent. There must be other formats in JtR whose hotspot loops has loop-carried dependence, like SunMD5. How did you parallelize them?
I tried parallelizing a inner loop in the hotspot loop of SunMD5, like this:
for (round = 0; round < maxrounds; round++) {
...
#pragma omp parallel for ...
for (idx = 0; idx < count; ++idx)
{ ... }
...
}
But the performance is worse than single-threaded.
Before: 628 c/s real, 628 c/s virtual
After: 304 c/s real, 82.4 c/s virtual
The outer loop still needs efficient handling.
Lei
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.