git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] Packing large repositories

From
Nicolas Pitre <nico@cam.org>
Date
Mar 31, 2007, 19:02 UTC
Message-ID
<alpine.LFD.0.98.0703311459000.28181@xanadu.home>
In-Reply-To
<Pine.LNX.4.64.0703311033290.6730@woody.linux-foundation.org>
On Sat, 31 Mar 2007, Linus Torvalds wrote:
Show 7 quoted lines
> The thing is, I think the index-pack could be improved, but I think we can 
> get a bigger improvement from just being more intelligent about searching 
> than from actually needing to re-organize the pack.
> 
> Here's a few clues:
>  - one of the fundamental rules about cryptographic hashes is that they 
>    are *evenly*distributed*
I was thinking about that too.
Show 14 quoted lines
> So here's a suggestion:
> 
>  - start finding a range using the 256-entry fan-out, exactly the way we 
>    did for the binary search. It's cheap. We could probably avoid EVEN 
>    THIS, and just do one more newton-raphson iteration more. But since we 
>    have the data, we migth as well use it. After all, it really *is* just 
>    a first approximation of newton-raphson, and while it uses only 8 bits 
>    (and we could do better), at least it's an *exact* one.
> 
>  - use newton-raphson to iterate closer. It should be a much faster way to 
>    find the rough area for the entry we're searching for than binary 
>    search. Two or three iterations should get us there, easily.
> 
>  - do a linear search once you're close enough.
I like that.
Nicolas
Previous: Linus TorvaldsNext: Junio C Hamano
Message 7 of 15 in “[RFC] Packing large repositories”
  1. Dana HowMar 28, 2007
  2. Linus TorvaldsMar 28, 2007
  3. Shawn O. PearceMar 30, 2007
  4. Nicolas PitreMar 30, 2007
  5. Geert BoschMar 31, 2007
  6. Linus TorvaldsMar 31, 2007
  7. Nicolas PitreMar 31, 2007
  8. Junio C HamanoMar 31, 2007
  9. Linus TorvaldsMar 31, 2007
  10. Linus TorvaldsMar 31, 2007
  11. Geert BoschApr 2, 2007
  12. Shawn O. PearceApr 3, 2007
  13. Nicolas PitreMar 31, 2007
  14. Dana HowApr 2, 2007
  15. Sam VilainApr 2, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.