Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 22 Mar 2012 07:37:40 -0300
From: Claudio André <>
Subject: Re: New patch for OpenCL SHA-512

Em 22-03-2012 00:21, Solar Designer escreveu:
> Claudio, Lukas -
> On Mon, Mar 19, 2012 at 08:34:16AM -0300, Claudio Andr? wrote:
>> - avoid branch when possible (if becomes ternary operator ?)
> Does this change actually avoid branching?
I think so. Example bellow: it can solve the parameters and all cores 
work on the different data. Using an if, some cores do the "if" others 
have to wait. Same for else.
         ctx_update(&ctx, ((i & 1) != 0 ? p_sequence : alt_result->mem_08),
                          ((i & 1) != 0 ? passlength : 64));

Here, the compiler wasn't able to make this decisions alone.

BTW: i measured what is the most expensive part. Branch is less than 5%.

magnum: i use on AMD, 
but you have to have a paid version of Visual Studio to see the results .

>> - i know that passwords should be organized by its size (to avoid
>> branch). In my tests i noticed it was not happening (two size and three
>> size candidates put together). When a branch (if or for based on pass
>> size) happens, some cores stop (serialization) and performance goes
>> down. *John itself have to solve this*.
> You can approach solving this inside a format as well - you just need to
> have a larger number of candidate passwords buffered.  Then you'll put
> them into separate linked lists by length, and in crypt_all() you'll
> traverse those linked lists one by one.  I am doing a similar thing in
> revised trip_fmt.c (with grouping by two characters, but for grouping by
> length things are even simpler):
>> By the way, "why c/s virtual" improves a lot? What does it mean?
> It means that your code uses very little CPU time (indeed, it uses the
> GPU instead), so it achieves extremely high "virtual" speed per unit of
> CPU time consumed.
> Alexander

Content of type "text/html" skipped

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.