Re: [PATCH v2 11/25] object_array_remove_duplicates(): rewrite to reduce copying

2013-06-02 Thread Junio C Hamano
Michael Haggerty writes: >> The only caller of remove-duplicates is bundle.c, which gets many >> starting points and end points from the command line and tries to be >> nice by removing obvious duplicates, e.g. >> >> git bundle create t.bundle master master >> >> but I think its logic of d

Re: [PATCH v2 11/25] object_array_remove_duplicates(): rewrite to reduce copying

2013-05-30 Thread Michael Haggerty
On 05/29/2013 06:18 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> The old version copied one entry to its destination position, then >> deleted any matching entries from the tail of the array. This >> required the tail of the array to be copied multiple times. It didn't >> affect th

Re: [PATCH v2 11/25] object_array_remove_duplicates(): rewrite to reduce copying

2013-05-29 Thread Junio C Hamano
Michael Haggerty writes: > The old version copied one entry to its destination position, then > deleted any matching entries from the tail of the array. This > required the tail of the array to be copied multiple times. It didn't > affect the complexity of the algorithm because the whole tail h

[PATCH v2 11/25] object_array_remove_duplicates(): rewrite to reduce copying

2013-05-25 Thread Michael Haggerty
The old version copied one entry to its destination position, then deleted any matching entries from the tail of the array. This required the tail of the array to be copied multiple times. It didn't affect the complexity of the algorithm because the whole tail has to be searched through anyway.