Re: [fossil-users] MD5 and SHA1 from OpenSSL

2011-09-02 Thread Joerg Sonnenberger
On Thu, Sep 01, 2011 at 07:43:56PM +0200, Dmitry Chestnykh wrote: > My simple performance test of SHA-1 from checkin [f2ede7da6d] vs > OpenSSL shows that the latter is a bit faster: When I ported the NetBSD implementation, I was considering using OpenSSL. The discussion with Richard was essentiall

Re: [fossil-users] MD5 and SHA1 from OpenSSL

2011-09-01 Thread Dmitry Chestnykh
BTW, if I run `openssl sha1`, it's slower than Fossil's sha1test compiled with OpenSSL SHA-1: openssl sha1: real0m3.459s user0m3.126s sys 0m0.317s fossil with OpenSSL's SHA1 from my diff: real0m3.025s user0m2.707s sys 0m0.315s current fossil trunk: real0m3.557s us

Re: [fossil-users] MD5 and SHA1 from OpenSSL

2011-09-01 Thread Dmitry Chestnykh
> Given that one of fossil's selling points is ease of installation, including > having no external dependencies. Let's not change that. I agree, but I proposed (and the retracted) that OpenSSL will be used only when compiled with SSL support ;-) -- Dmitry Chestnykh ___

Re: [fossil-users] MD5 and SHA1 from OpenSSL

2011-09-01 Thread Mike Meyer
On Thu, Sep 1, 2011 at 11:20 AM, Dmitry Chestnykh wrote: > > but it's not clear the openssl code is always a win... I'm not sure > whether or not it's a good idea to try to determine at run time which to use > (since the check overhead has to be measurable after all). > > Yes, let's leave it as it

Re: [fossil-users] MD5 and SHA1 from OpenSSL

2011-09-01 Thread Ron Aaron
Not so fast! :) It seems that the current code is faster than openssl on intel (well, on linux anyway). But it is slower on AMD chips, whether 32 or 64 bit os. That is something which is easily detectable, although I don't know if I have the patience to try to figure out what is going on to make

Re: [fossil-users] MD5 and SHA1 from OpenSSL

2011-09-01 Thread Dmitry Chestnykh
> Maybe it depends on your specific hardware, but on linux32 (i3 core2) I get > (kubuntu11-04.iso) : Yay, good then, no need to use OpenSSL. I suspect this is due to LLVM backend of OS X compiler which is default in Lion. For some crypto code I've written it compiles binaries that are slower t

Re: [fossil-users] MD5 and SHA1 from OpenSSL

2011-09-01 Thread Ron Aaron
Maybe it depends on your specific hardware, but on linux32 (i3 core2) I get (kubuntu11-04.iso) : openssl sha1 : 3.823 fossil sha1sum : 3.660 (old fossil: 4.936) On linux64 (amd athlon X2, using a 600M data file): openssl sha1 : 2.504 fossil sha1sum : 3.202 (old fossil: 4.211) (these are "best ti

[fossil-users] MD5 and SHA1 from OpenSSL

2011-09-01 Thread Dmitry Chestnykh
I noticed the recent effort to optimize SHA-1 in Fossil, and it crossed my mind that we can use OpenSSL implementation (which seem to be heavily optimized), since we already link it when FOSSIL_ENABLE_SSL is defined, and fall back to the current implementation if Fossil is not linked without Ope