[PATCH 6 of 6 v6 lazy-manifest] lazymanifest: use a binary search to do an insertion

Kevin Bullock kbullock+mercurial at ringworld.org
Sat Mar 7 23:45:16 CST 2015


> On Mar 7, 2015, at 11:16 AM, Augie Fackler <raf at durin42.com> wrote:
> 
> # HG changeset patch
> # User Augie Fackler <augie at google.com>
> # Date 1422682240 28800
> #      Fri Jan 30 21:30:40 2015 -0800
> # Node ID 4df349ba93186f8601447b354273d411c71208b4
> # Parent  6587f242aaa0732525ed3f8c2dc61c13dd3dc3ec
> lazymanifest: use a binary search to do an insertion
> 
> This makes insertions log(n) plus some memmove() overhead, rather than
> doing an append followed by an n*log(n) sort. There's probably a lot
> of performance to be gained by adding a batch-add method, which could
> be smarter about the memmove()s performed.
> 
> Includes a couple of extra tests that should help prevent bugs.
> 
> Thanks to Martin for some significant pre-mail cleanup of this change.

Series LGTM. I'll leave it to Matt to queue it though.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list