Re: [PATCH 1/3] Lazily open pack index files on demand
- From
Nicolas Pitre <nico@cam.org>
- Date
- May 27, 2007, 23:35 UTC
- Message-ID
- <alpine.LFD.0.99.0705271929480.3366@xanadu.home>
- In-Reply-To
- <20070527215245.GD28023@spearce.org>
On Sun, 27 May 2007, Shawn O. Pearce wrote:
Show 5 quoted lines
> Nicolas Pitre <nico@cam.org> wrote: > > BTW I think the Newton-Raphson based index lookup approach should be > > revived at some point. > > That doesn't help with 10 packfiles though, does it?
It helps irrespective of the number of pack files. With the current binary search the lookup cost is O(log n). With a Newton method this cost is almost O(1). If you have 10 pack files then you may have to do 5 separate lookups on average, but those lookups are still faster with a Newton method.
Nicolas