Andy Polyakov wrote:
>
> 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.
Sounds like a good idea, so long as it is optional... why? Coz people
keep wanting to cram it into embedded systems where space is at a
premium.
It ought to be easy to provide an aligned_malloc() function that is
optionally just malloc(), right?
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]