Hi, everybody!

I while ago I've wondered what do we know about alignment of data SSL
layer feeds libcrypto with. The reason for posing the question was that
it turns to be quite beneficial to tune algorithms for cases when data
is aligned. On digest algorithms I've observed 20-25% improvement on
SPARC and something like over 40% on Alpha. Now I can report that I
managed to get RC4 running 70% faster on Alpha in cases when data's
aligned. How about that? Well, there is of course an explanation. Point
is that Alpha doesn't have character store instruction and compiler has
to schedule one 64-bit load, some computational instructions and finally
64-bit store for every character assignment in C. In cases when data
happened to be aligned one can naturally fold up to 8 load/load-stores
into single load/store.

But after examining SSL code I've realized that SSL layer *always* feeds
libcrypto with *unaligned* data:-( So I'm considering to tweak the SSL
code so that message payload gets aligned at 64-bit boundary. But before
I do so I'd like to hear opinions on this.

Cheers. Andy.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to