From owner-freebsd-current Fri Apr 21 21:35: 7 2000 Delivered-To: freebsd-current@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [63.67.141.99]) by hub.freebsd.org (Postfix) with ESMTP id D722C37BAB4; Fri, 21 Apr 2000 21:35:01 -0700 (PDT) (envelope-from winter@jurai.net) Received: from localhost (winter@localhost) by sasami.jurai.net (8.9.3/8.8.7) with ESMTP id AAA18166; Sat, 22 Apr 2000 00:35:00 -0400 (EDT) Date: Sat, 22 Apr 2000 00:35:00 -0400 (EDT) From: "Matthew N. Dodd" To: Kris Kennaway Cc: current@FreeBSD.ORG Subject: Re: OpenSSL asm optimizations In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Can these be turned on at runtime? My concern is that build systems that compile for other machines not generate code dependent on the machine thats building the code. On Fri, 21 Apr 2000, Kris Kennaway wrote: > OpenSSL includes asm code for several platforms to speed up various > operations. Currently we don't build any of this - the attached patch > turns on asm code for Pentiums and above (it relies on an uncommitted > patch to sys.mk which defined MACHINE_CPU ?= i386). Set MACHINE_CPU to > "i586" or "i686" (both are actually identical at present) and rebuild. > > Typical speed improvements are between 2x and 5x for BigNum, Blowfish, > CAST, DES, MD5, RC4, RC5, RIPEMD-160, and SHA-1 operations, as measured by > 'openssl speed' on my Pentium Pro 233 (speeds are in K/sec for packets of > the given size): > > === BLOWFISH === > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > blowfish cbc 3325.35k 4417.62k 4553.81k 4572.46k 4595.71k > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > blowfish cbc 7073.58k 8099.29k 8286.63k 8328.53k 8315.07k > > === CAST === > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > cast cbc 3249.59k 4231.19k 4394.88k 4401.69k 4437.97k > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > cast cbc 6956.17k 7999.28k 8208.47k 8199.05k 8192.00k > > === DES === > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > des cbc 2291.38k 2404.86k 2426.97k 2436.64k 2443.95k > des ede3 492.61k 516.87k 519.83k 521.18k 520.20k > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > des cbc 4830.90k 5301.97k 5412.18k 5419.02k 5355.72k > des ede3 1831.93k 1919.80k 1929.86k 1932.36k 1913.72k > > === MD5 === > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > md5 1636.10k 7736.92k 13991.76k 17495.04k 18879.83k > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > md5 2609.84k 13585.19k 26511.38k 34934.97k 38629.09k > > === RC4 === > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > rc4 12947.45k 16970.70k 18044.59k 18370.22k 18275.58k > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > rc4 18209.51k 25287.65k 26100.65k 26139.99k 26512.82k > > === RC5 === > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > rc5-32/12 cbc 5115.15k 8124.08k 8766.29k 8814.59k 8928.03k > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > rc5-32/12 cbc 12462.59k 15226.54k 15804.76k 16218.86k 16447.82k > > === RIPEMD-160 === > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > rmd160 849.94k 3680.04k 6326.22k 7626.07k 8123.73k > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > rmd160 1279.72k 5915.67k 10461.46k 12978.21k 13944.41k > > === SHA1 === > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > sha1 1081.31k 2844.71k 5784.80k 7765.50k 8650.75k > > type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes > sha1 1617.59k 7664.76k 13538.05k 17012.18k 18419.89k > > Kris > > ---- > In God we Trust -- all others must submit an X.509 certificate. > -- Charles Forsythe > -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message