Subject: 32 bit vs 64 bit vs what?
To: None <port-sparc64@netbsd.org>
From: matthew green <mrg@eterna.com.au>
List: port-sparc64
Date: 10/26/2002 21:13:44
someone should do some real testing. this is what i get from "openssl speed"
using 'native' (64 bit sparc, no special compiler options):
OpenSSL 0.9.6g 9 Aug 2002
built on: NetBSD 1.6I
options:bn(32,32) md2(int) rc4(ptr,int) des(ptr,risc1,16,int) blowfish(idx)
compiler: gcc version 2.95.3 20010315 (release) (NetBSD nb3)
The 'numbers' are in 1000s of bytes per second processed.
type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
md2 247.08k 680.76k 916.35k 1004.09k 1031.75k
mdc2 0.00 0.00 0.00 0.00 0.00
md4 4560.10k 20584.97k 35019.00k 42595.36k 45408.47k
md5 3387.74k 14127.03k 23172.49k 27666.85k 29300.54k
hmac(md5) 1309.33k 7256.18k 16690.26k 18601.10k 28855.65k
sha1 1627.51k 4221.74k 8840.17k 12161.61k 13652.44k
rmd160 1346.39k 2606.79k 6492.59k 10331.01k 12476.43k
rc4 20580.08k 25461.53k 26448.75k 26682.58k 26422.58k
des cbc 3792.67k 4083.72k 4121.52k 4136.13k 4132.88k
des ede3 1451.83k 1498.84k 1502.53k 1506.25k 1505.09k
idea cbc 0.00 0.00 0.00 0.00 0.00
rc2 cbc 4301.95k 4623.95k 4667.78k 4678.17k 4678.72k
rc5-32/12 cbc 0.00 0.00 0.00 0.00 0.00
blowfish cbc 6523.31k 7170.48k 7266.32k 7296.73k 7485.55k
cast cbc 5973.51k 6801.48k 6983.05k 6983.58k 6965.95k
sign verify sign/s verify/s
rsa 512 bits 0.0184s 0.0017s 54.4 594.1
rsa 1024 bits 0.1063s 0.0057s 9.4 174.9
rsa 2048 bits 0.6269s 0.0210s 1.6 47.7
rsa 4096 bits 5.2136s 0.0780s 0.2 12.8
sign verify sign/s verify/s
dsa 512 bits 0.0170s 0.0212s 58.9 47.2
dsa 1024 bits 0.0571s 0.0700s 17.5 14.3
dsa 2048 bits 0.2036s 0.2542s 4.9 3.9
and using a sparc userland i have just built on my mac, i chroot'ed
/bin/sh into the $DESTDIR and simply ran "openssl speed":
OpenSSL 0.9.6g 9 Aug 2002
built on: NetBSD 1.6J
options:bn(32,32) md2(int) rc4(ptr,int) des(idx,cisc,16,long) blowfish(ptr)
compiler: gcc version 2.95.3 20010315 (release) (NetBSD nb3)
The 'numbers' are in 1000s of bytes per second processed.
type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
md2 327.47k 910.31k 1229.32k 1346.94k 1386.40k
mdc2 0.00 0.00 0.00 0.00 0.00
md4 5299.85k 23867.54k 41527.84k 51063.32k 54657.21k
md5 3997.55k 17854.95k 30420.23k 37049.84k 39548.91k
hmac(md5) 1312.52k 8288.85k 20400.31k 32223.40k 38746.61k
sha1 2555.63k 8630.29k 15487.22k 19393.56k 20911.58k
rmd160 1564.85k 4031.39k 9163.19k 13436.62k 15542.24k
rc4 15068.71k 18376.93k 18812.48k 18926.21k 18774.35k
des cbc 5678.09k 6915.56k 7095.12k 7139.61k 7126.65k
des ede3 2426.77k 2602.72k 2622.96k 2627.35k 2626.94k
idea cbc 0.00 0.00 0.00 0.00 0.00
rc2 cbc 4864.71k 5286.29k 5346.64k 5382.64k 5355.48k
rc5-32/12 cbc 0.00 0.00 0.00 0.00 0.00
blowfish cbc 10285.20k 12357.41k 12567.48k 12644.75k 13261.73k
cast cbc 6941.14k 8338.45k 8525.29k 8478.86k 8752.82k
sign verify sign/s verify/s
rsa 512 bits 0.0654s 0.0072s 15.3 138.0
rsa 1024 bits 0.4606s 0.0262s 2.2 38.2
rsa 2048 bits 3.1597s 0.0978s 0.3 10.2
rsa 4096 bits 22.7533s 0.4062s 0.0 2.5
sign verify sign/s verify/s
dsa 512 bits 0.0724s 0.0906s 13.8 11.0
dsa 1024 bits 0.2575s 0.3218s 3.9 3.1
dsa 2048 bits 1.0355s 1.0621s 1.0 0.9
i believe in all cases "bigger is better". there are two very strange
observations here. for all the hash & cipher functions, the 32 bit code
ran faster by about 1/3rd pretty much across the board. however, for
the signers (rsa/dsa) the 32 bit code is about 4 times slower!
i'm confused by the above. i do note that they have some fairly different
openssl options? perhaps that is simply the issue.
.mrg.