diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-05 20:49:41 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-08-06 13:56:45 -0700 |
commit | 7b5075fcfb069fc36ba4cfe5567234974793ab58 (patch) | |
tree | 2eba4fbbee102e4e80ec5377b201d5c1f56554f8 /ll-merge.h | |
parent | block-sha1: make the 'ntohl()' part of the first SHA1 loop (diff) | |
download | tgif-7b5075fcfb069fc36ba4cfe5567234974793ab58.tar.xz |
block-sha1: re-use the temporary array as we calculate the SHA1
The mozilla-SHA1 code did this 80-word array for the 80 iterations. But
the SHA1 state is really just 512 bits, and you can actually keep it in
a kind of "circular queue" of just 16 words instead.
This requires us to do the xor updates as we go along (rather than as a
pre-phase), but that's really what we want to do anyway.
This gets me really close to the OpenSSL performance on my Nehalem.
Look ma, all C code (ok, there's the rol/ror hack, but that one doesn't
strictly even matter on my Nehalem, it's just a local optimization).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'll-merge.h')
0 files changed, 0 insertions, 0 deletions