Re: Fix a pathological case in git detecting proper renames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux