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

Re: [PATCH 1/3] Lazily open pack index files on demand

From
Karl Hasselström <kha@treskal.com>
Date
May 28, 2007, 17:40 UTC
Message-ID
<20070528174037.GA1118@diana.vm.bytemark.co.uk>
In-Reply-To
<alpine.LFD.0.98.0705280907290.26602@woody.linux-foundation.org>
On 2007-05-28 09:22:02 -0700, Linus Torvalds wrote:
Show 5 quoted lines
> Secondly, the cost of Newton isn't "almost O(1)". I don't know
> _what_ it is (the rule of thumb with Newton-Raphson should be that
> the number of significant correct digits in the answer doubles with
> each iteration: I think that probably means that it should
> approximate O(loglog(n)), but I haven't thought deeply about it.

With binary search, the number of correct bits in the index increases by 1 for each iteration. With Newton iteration, the number of correct bits doubles for each iteration. So the number of Newton iteration should be the log of the number of binary search iterations, i.e. log log n like you say.

But for non-astronomical values of n, I agree that this kind of big-O analysis is much inferior to benchmarking.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: Nicolas Pitre
Message 22 of 22 in “Lazily open pack index files on demand”
  1. 1/3 Lazily open pack index files on demandShawn O. Pearce, May 26, 2007
  2. Junio C HamanoMay 26, 2007
  3. Shawn O. PearceMay 26, 2007
  4. Dana HowMay 26, 2007
  5. Nicolas PitreMay 27, 2007
  6. Dana HowMay 27, 2007
  7. Nicolas PitreMay 27, 2007
  8. Shawn O. PearceMay 27, 2007
  9. Dana HowMay 27, 2007
  10. Nicolas PitreMay 27, 2007
  11. Shawn O. PearceMay 27, 2007
  12. Dana HowMay 28, 2007
  13. A Large Angry SCMMay 28, 2007
  14. Nicolas PitreMay 28, 2007
  15. Nicolas PitreMay 28, 2007
  16. Nicolas PitreMay 27, 2007
  17. Dana HowMay 27, 2007
  18. Shawn O. PearceMay 27, 2007
  19. Nicolas PitreMay 27, 2007
  20. Linus TorvaldsMay 28, 2007
  21. Nicolas PitreMay 28, 2007
  22. Karl HasselströmMay 28, 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.