Is "ASM" MASM or NASM compilation? And what is the value "287633.90k" means?


Can you send your testing code on C/ะก++? I will test.



----------------------------------------------------------------------------------------------------------------------------------
From: Timur I. Bakeyev
Sent: Wednesday, November 14, 2012 5:57 PM
To: openssl-dev
Subject: RC4 - asm or C?
Hi all!

I know, it's an old topic, been discussed several times in the past, but
I've decided to check in my own environment the
difference between asm and C implementations of RC4 in OpenSSL 1.0.1c on
Intel(R) Xeon(R) CPU X5679 @ 3.20GHz.

http://zombe.es/post/4059999783/openssl-outmoded-asm

Well, results are quite interesting.

# ./openssl -evp rc4

ASM
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
rc4 287633.90k 573238.77k 735101.34k 777062.91k 794848.66k
rc4 286393.18k 572485.03k 731541.58k 795963.08k 817934.21k

vs.

NO ASM
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
rc4 462543.94k 530657.76k 539455.79k 547207.11k 548447.55k
rc4 472625.58k 531457.61k 541795.39k 547749.59k 548894.14k

For the small blocks C implementation still rocks(performance gain is
almost 200%), but
while the block size grows, assembler code outperforms C one.

I guess, from now on asm implementation of RC4 should be preferred.

But I'm curious, why there is such a drop in performance of asm code and
what can be done to address that issue? Also,
what is the common size of the RC4 block in SSL traffic, which test is more
realistic?

With best regerds,
Timur Bakeyev.

Reply via email to