From: David Turner <dturner@twopensource.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael Haggerty <mhagger@alum.mit.edu>,
git@vger.kernel.org, David Turner <dturner@twitter.com>
Subject: Re: [PATCH v5 2/2] refs.c: SSE4.2 optimizations for check_refname_component
Date: Tue, 03 Jun 2014 23:35:11 -0400 [thread overview]
Message-ID: <1401852911.18134.134.camel@stross> (raw)
In-Reply-To: <xmqqd2epwsw0.fsf@gitster.dls.corp.google.com>
On Tue, 2014-06-03 at 15:05 -0700, Junio C Hamano wrote:
> > + if (((uintptr_t) vp & (PAGE_SIZE - 1)) > PAGE_SIZE - BLOCK_SIZE)
> > + /* End-of-page; fall back to slow method for
> > + * this entire component. */
> > + return check_refname_component_1(refname, flags);
>
> It is somewhat sad that we have to redo the whole thing, but nobody
> higher in the callchain knows how long the refname will be before
> calling us, so this cannot be avoided.
It actually could be avoided; we could pass in some extra args that let
check_refname_component_1 start checking after the part that we have
already checked. I decided not to do this because I believe that
the average refname component is short, which means that the cost is not
too high and that it won't happen very often. But I would be willing to
change this if you would like.
next prev parent reply other threads:[~2014-06-04 3:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-02 6:20 [PATCH v5 1/2] refs.c: optimize check_refname_component() David Turner
2014-06-02 6:20 ` [PATCH v5 2/2] refs.c: SSE4.2 optimizations for check_refname_component David Turner
2014-06-03 22:05 ` Junio C Hamano
2014-06-04 3:35 ` David Turner [this message]
2014-06-03 18:08 ` [PATCH v5 1/2] refs.c: optimize check_refname_component() Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2014-06-03 18:21 David Turner
2014-06-03 18:21 ` [PATCH v5 2/2] refs.c: SSE4.2 optimizations for check_refname_component David Turner
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=1401852911.18134.134.camel@stross \
--to=dturner@twopensource.com \
--cc=dturner@twitter.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mhagger@alum.mit.edu \
/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.