Re: [PATCH] Remove duplicate pathspecs from ls-files command line

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

 



Alex Riesen <raa.lkml@xxxxxxxxx> writes:

> Junio C Hamano, Wed, Aug 29, 2007 22:44:22 +0200:
>> 
>> That loop is plain old O(n^2) that penalizes everybody.
>> 
>
> Maybe something in pathspec matching code could be reused to notice
> the duplications? It has to go through all of them anyway...

Does anything speak against sorting the pathspecs?  That is an O(n log
n) operation, and dup detection is trivial afterwards.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
-
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