Re: [PATCH v2] cache.h: eliminate SHA-1 deprecation warnings on OS X 10.8

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

 



On Fri, May 10, 2013 at 11:23 PM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
> Hi,
>
> David Aguilar wrote:
>
>> Mac OS X Mountain Lion prints warnings when building git:
>>
>>       warning: 'SHA1_Init' is deprecated
>>       (declared at /usr/include/openssl/sha.h:121)
>>
>> Silence the warnings by using the Common Digest SHA-1
>> functions for SHA1_Init(), SHA1_Update(), and SHA1_Final().
>
> Thanks.
>
> Does this perform better or worse than just setting
> BLK_SHA1=YesPlease?  I'd naively think it could go either way: on one
> hand adding another library dependency can slow down startup, and on
> the other hand the implementation may or may not be optimized better
> than the generic block-sha1/ implementation.

Pretty much identical.

Here are the timings (I should probably read t/perf/README and get
better numbers):

Best of ten
$ time git rev-list --all --objects >/dev/null

# master
git rev-list --all --objects > /dev/null  5.16s user 0.11s system 99%
cpu 5.277 total

# BLK_SHA1
git rev-list --all --objects > /dev/null  5.17s user 0.11s system 99%
cpu 5.299 total

# CommonDigest
git rev-list --all --objects > /dev/null  5.18s user 0.11s system 99%
cpu 5.301 total

The library startup cost is identical to master since at the end of
the day it's still libcrypto.

FWIW the way it's done in this patch still allows defining BLK_SHA1,
which is parity with how the Makefile behaves on Linux.

Re-roll?
--
David
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]