Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120626034102.GA12266@openwall.com>
Date: Tue, 26 Jun 2012 07:41:02 +0400
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: md5cryptsse()'s uses of length[]

On Tue, Jun 26, 2012 at 06:13:13AM +0400, Solar Designer wrote:
> In sse-intrinsics.c: md5cryptsse(), there's a loop that assigns password
> lengths to length[i], then uses length[i] many times.  Wouldn't it be
> better to use an int variable local to that loop instead, and only at
> the end of each loop iteration store the value into length[i]?

Attached is a patch that fixes this.  No measurable performance
difference from that (since it's out of the 1000 iterations loop).
However, while at it I also spotted the integer division in dispatch()
(I am surprised: even the old non-vectorized code avoided that), which I
patched out for a 0.5% speedup here.

We might want to regenerate and re-benchmark icc's .S files now.

Alexander

View attachment "john-md5cryptsse-opt.diff" of type "text/plain" (6401 bytes)

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.