Folks! Are there people with EM64T P4 in their disposal on the list?

I have published a paper about optimizing RC4 for AMD64. A working implementation, designed to be easily integrated into OpenSSL, is also provided:

http://epita.fr/~bevand_m/papers/rc4-amd64.html

http://cvs.openssl.org/rlog?f=openssl/crypto/rc4/asm/rc4-amd64.pl.

Even though both implementations mention approximately same improvement factor [mine was 2.22x, yours - 2.3x], your final result is admittedly better than mine. Apparently we ended up on different base-lines. Most notably you maintain that the result of 135MBps was obtained on 1.8GHz CPU for -DRC4_INT='unsigned char'. I can't confirm this. I've got less than 100MBps [76 on 1.4GHz, 97 if scaled up to 1.8GHz] out of vanilla 0.9.7d OpenSSL build with -DRC4_INT='unsigned char'. It should be noted though that I used gcc 3.3.x, while you're using 3.4.x. Can it make such big difference? But in either case, your improvement coefficient is over +200% in respect to my baseline... Well done:-)

However! I totally disagree with the final conclusion you make. The fact that it's possible to boost RC4 performance by factor of +3x does not in any way mean that it would be possible to turbo-change any other algorithm by same or even comparable factor by "64-bitifying" the implementation. And indeed, closer look at the differences and tweaking OpenSSL implementation revealed that it pretty much boils down to order of load instructions. This indicates that algorithm is tightly memory bound and is rather sensitive to cache architecture [if not even implementation]. Obviously it suffers from some, presumably Read-After-Write penalty, when order of memory references is "wrong." In other words RC4 is just too special, too memory-bound and too cache-trashing to be specific, to project its performance improvement coefficient on other algorithms.

Cheers. A.

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

Reply via email to