[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ASM vs portable code [WAS: Re: Java DES breaker?]



On Sat, 14 Dec 1996 21:28:46 -0800, Dale Thorn wrote:

>> Averaging several runs:
>> "C":   102,300 crypts/sec
>> ASM:   238,000 crypts/sec

>Someone on this list should know if it is possible to maximize speed in
>a typical 'C' routine, using Register variables (particularly for loops),
>inlining everything possible, etc., to get executable code much closer
>than a factor of 2x difference.  Can it be done on a PC, and how hard
>would it be to explain, to cover a representative variety of techniques?

A good optimizing compiler comes _close_ to hand coded, especially with the
many new concerns on Pentium+ processors (pipeline optimization, fpu tricks,
etc).

#  Chris Adams  <[email protected]> | http://www.io-online.com/adamsc/adamsc.htp
#  <[email protected]>                 | send mail with subject "send PGPKEY"
"That's our advantage at Microsoft; we set the standards and we can change them."
   --- Karen Hargrove, Microsoft (quoted in the Feb 1993 Unix Review editorial)