From: Jeff King <peff@peff.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kumar Gala <galak@kernel.crashing.org>,
Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Fix a pathological case in git detecting proper renames
Date: Thu, 29 Nov 2007 19:48:05 -0500 [thread overview]
Message-ID: <20071130004805.GA12185@coredump.intra.peff.net> (raw)
In-Reply-To: <alpine.LFD.0.9999.0711291625580.8458@woody.linux-foundation.org>
On Thu, Nov 29, 2007 at 04:41:09PM -0800, Linus Torvalds wrote:
> It's not pretty, it's not smart, but it seems to work. There's something
> to be said for keeping it simple and stupid.
>
> And it should not be nearly as expensive as it may _look_. Yes, the loop
> is "(i = 0; i < num_create * num_src; i++)", but the important part is
> that the whole array is sorted by rename score, and we have a
>
> if (mx[i].score < minimum_score)
> break;
>
> in it, so uthe loop actually would tend to terminate rather quickly.
I think the slowdown is a non-issue. From the benchmarking I did in the
past, all of the time was spent _before_ even getting to the qsort of
scores. So even if you doubled the expense of that loop, it would have a
negligible impact.
But I haven't actually benchmarked this new patch, of course.
-Peff
next prev parent reply other threads:[~2007-11-30 0:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-29 16:57 problem with git detecting proper renames Kumar Gala
2007-11-29 17:44 ` Linus Torvalds
2007-11-29 19:06 ` Kumar Gala
2007-11-29 19:27 ` Linus Torvalds
2007-11-29 19:32 ` Kumar Gala
2007-11-29 20:27 ` Kumar Gala
2007-11-29 21:30 ` Fix a pathological case in " Linus Torvalds
2007-11-29 23:03 ` Linus Torvalds
2007-11-29 23:52 ` Jeff King
2007-11-30 0:41 ` Linus Torvalds
2007-11-30 0:48 ` Jeff King [this message]
2007-11-30 1:18 ` Kumar Gala
2007-11-30 0:40 ` Junio C Hamano
2007-11-30 0:21 ` problem with " Jakub Narebski
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=20071130004805.GA12185@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=galak@kernel.crashing.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=torvalds@linux-foundation.org \
/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).