From: Paul Mackerras Date: Fri, 22 Apr 2005 07:35:40 GMT Subject: Re: Mozilla SHA1 implementation Message-ID: <17000.43340.760901.175004@cargo.ozlabs.ibm.com> In-Reply-To: Linus Torvalds writes: > Interestingly, the Mozilla SHA1 code is about twice as fast as the openssl > code on my G5, and judging by the disassembly, it's because it's much > simpler. I think the openssl people have unrolled all the loops totally, > which tends to be a disaster on any half-way modern CPU. But hey, it could > be something as simple as optimization flags too. Which gcc version are you using? I get the opposite result on my 2GHz G5: the Mozilla version does 45MB/s, the openssl version does 135MB/s, and my version does 218MB/s. The time for a fsck-cache on a linux-2.6 tree (cache hot) is 8.0 seconds for the Mozilla version, 5.2 seconds for the openssl version, and 4.4 seconds for my version. Paul.