Re: remove_duplicates() in builtin/fetch-pack.c is O(N^2)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 21, 2012, 09:09 UTC
- Message-ID
- <7vaa1199yp.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <4FB9F92D.8000305@alum.mit.edu>
Michael Haggerty <mhagger@alum.mit.edu> writes:
> It would be pretty trivial to reduce the work to O(N) by using a hash > set to keep track of the references that have already been seen.
Sounds like a sensible thing to do.