From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Victoria Dye <vdye@github.com>,
git@vger.kernel.org, Phillip Wood <phillip.wood123@gmail.com>
Subject: Re: [PATCH 2/3] read-cache: read on-disk entries in byte order
Date: Thu, 29 Sep 2022 08:47:24 -0700 [thread overview]
Message-ID: <xmqqczbep4hf.fsf@gitster.g> (raw)
In-Reply-To: <YzWBEoRkCmbUkIs8@coredump.intra.peff.net> (Jeff King's message of "Thu, 29 Sep 2022 07:27:14 -0400")
Jeff King <peff@peff.net> writes:
> On Wed, Sep 28, 2022 at 12:21:15AM -0400, Jeff King wrote:
>
>> The downside is that we're copying the data an extra time. It's not very
>> much data, and it's all fixed size, so the compiler should be able to do
>> a reasonable job of optimizing here. But I didn't time the potential
>> impact.
> ...
> Summary
> './test-tool.old read-cache 1000' ran
> 1.11 ± 0.04 times faster than './test-tool.new read-cache 1000'
>
> I think that's probably the nail in the coffin for my proposed approach.
> To be fair, it's only .3ms extra for a normal program which reads the
> index once. That's not that big in absolute numbers. But there are
> larger index files in the wild. And the improvement in simplicity and
> readability is simply not that great.
Thanks for the due diligence. This result may be an indication of
how efficient the existing code is, but it is a bit surprising that
one more copy of the stat_data struct makes that much difference.
next prev parent reply other threads:[~2022-09-29 15:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 21:11 What's cooking in git.git (Sep 2022, #08; Tue, 27) Junio C Hamano
2022-09-28 1:52 ` Victoria Dye
2022-09-28 4:18 ` vd/fix-unaligned-read-index-v4, was " Jeff King
2022-09-28 4:19 ` [PATCH 1/3] pack-bitmap: make read_be32() public Jeff King
2022-09-28 4:21 ` [PATCH 2/3] read-cache: read on-disk entries in byte order Jeff King
2022-09-29 11:27 ` Jeff King
2022-09-29 15:47 ` Junio C Hamano [this message]
2022-09-28 4:23 ` [PATCH 3/3] read-cache: use read_be32() in create_from_disk() Jeff King
2022-09-28 16:41 ` vd/fix-unaligned-read-index-v4, was Re: What's cooking in git.git (Sep 2022, #08; Tue, 27) Junio C Hamano
2022-09-28 17:01 ` Ævar Arnfjörð Bjarmason
2022-09-28 17:41 ` Junio C Hamano
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=xmqqczbep4hf.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=phillip.wood123@gmail.com \
--cc=vdye@github.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.