Bill Sommerfeld wrote:
> On Wed, 2007-01-24 at 13:53 -0800, Anthony Scarpino wrote:
>   
>> I gave it a quick look and I'm not sure it's as bad as you think.. A 
>> number of the places there are if()'s are in regard to digest length, 
>> and with sha244 those lengths would be different and turn those 
>> conditions into switch().  Assuming that you are saying SHA224 would be 
>> appending in the above two lists..
>>     
>
> The ones I'm most concerned about are the ones in the middle of
> SHA2Update, which is a performance-critical path.   That is *not* the
> place for a switch...
>   

I always thought the compilers were pretty good at optimizing switch()
into a dispatch table... so much so that switch() was often faster than
the corresponding set of if..else..if branches.

    --Garrett
>                                               - Bill
>
>
> _______________________________________________
> crypto-discuss mailing list
> crypto-discuss at opensolaris.org
> http://opensolaris.org/mailman/listinfo/crypto-discuss
>   


-- 
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134  Fax: 951 325-2191


Reply via email to