git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: David Aguilar <davvid@gmail.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>,
	John Keeping <john@keeping.me.uk>
Subject: Re: [PATCH v2] cache.h: eliminate SHA-1 deprecation warnings on OS X 10.8
Date: Sat, 11 May 2013 10:45:43 +0200	[thread overview]
Message-ID: <20130511084543.GA1905@sigill.intra.peff.net> (raw)
In-Reply-To: <CAJDDKr7-sMrX=2Aek1LY8knM2jFPs933eLj3iZdTa68YYv-6Og@mail.gmail.com>

On Sat, May 11, 2013 at 01:38:32AM -0700, David Aguilar wrote:

> > Adding "--verify-objects" would sha1 the blobs, too, which might be more
> > reasonable (or running "git fsck"). Something like "git add" on a large
> > blob would also be a good test.
> 
> Thanks.  Here are the numbers with --verify-objects:
> 
> $ time git rev-list --all --objects --verify-objects >/dev/null
> 
> # CommonCrypto 32.24s user 4.65s system 99% cpu 37.098 total
> # master       33.00s user 4.68s system 99% cpu 37.852 total
> # BLK_SHA1     54.17s user 4.67s system 99% cpu 58.928 total
> 
> Doing BLK_SHA1 seems like less of a good idea now, so I think my
> latest re-roll might be the way to go...

Wow, that's really terrible. What level of optimization do you compile
with? With the other implementations, you are calling into
(presumably) optimized library code, but with BLK_SHA1 you are getting
whatever you just compiled.

Here are three timings that show how big a difference that can make:

  openssl,  -O0    0m21.152s
  BLK_SHA1, -O0    0m31.920s
  BLK_SHA1, -O3    0m19.652s

So it is a win over openssl with optimizations on, but a pretty big loss
otherwise.

-Peff

  reply	other threads:[~2013-05-11  8:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-11  2:44 [PATCH v2] cache.h: eliminate SHA-1 deprecation warnings on OS X 10.8 David Aguilar
2013-05-11  6:23 ` Jonathan Nieder
2013-05-11  7:11   ` David Aguilar
2013-05-11  8:22     ` Jeff King
2013-05-11  8:38       ` David Aguilar
2013-05-11  8:45         ` Jeff King [this message]
2013-05-11  9:17           ` David Aguilar
2013-05-11  9:50             ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130511084543.GA1905@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=john@keeping.me.uk \
    --cc=jrnieder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).