From: Junio C Hamano Date: Mon, 21 May 2012 09:09:34 GMT Subject: Re: remove_duplicates() in builtin/fetch-pack.c is O(N^2) Message-ID: <7vaa1199yp.fsf@alter.siamese.dyndns.org> In-Reply-To: <4FB9F92D.8000305@alum.mit.edu> Michael Haggerty 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.