From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Eli Barzilay <eli@barzilay.org>, git@vger.kernel.org
Subject: Re: [PATCH] remove over-eager caching in sha1_file_name
Date: Tue, 25 May 2010 22:07:13 -0700 [thread overview]
Message-ID: <7vtypvqmim.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 20100522065942.GB11335@coredump.intra.peff.net
Jeff King <peff@peff.net> writes:
> Actually, thinking on it more, micro-optimizing this is really
> pointless. I was thinking that it would get called a lot, so we need to
> care. But the next step is almost certainly to open, mmap, and zlib
> decompress the resulting object, which is way more expensive.
>
> So here it is with caching ripped out. More readable and more robust,
> and I'm sure we can afford an extra strlen() and memcpy() on each object
> lookup.
Makes sense; thanks.
next prev parent reply other threads:[~2010-05-26 5:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-17 10:53 Checking out on a different+partial directory Eli Barzilay
2010-05-22 5:48 ` Jeff King
2010-05-22 6:43 ` [PATCH] fix over-eager caching in sha1_file_name Jeff King
2010-05-22 6:59 ` [PATCH] remove " Jeff King
2010-05-26 5:07 ` Junio C Hamano [this message]
2010-05-27 5:10 ` Checking out on a different+partial directory Eli Barzilay
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=7vtypvqmim.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=eli@barzilay.org \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).