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

Re: RFC: New diff-delta.c implementation

From
Petr Baudis <pasky@suse.cz>
Date
Apr 24, 2006, 20:37 UTC
Message-ID
<20060424203734.GH27689@pasky.or.cz>
In-Reply-To
<20060424151901.GA2663@adacore.com>

Dear diary, on Mon, Apr 24, 2006 at 05:19:01PM CEST, I got a letter where Geert Bosch <bosch@adacore.com> said that...

Show 21 quoted lines
> > But here comes the sad part.  Even after simplifying the code as much as 
> > I could, performance is still significantly worse than the current 
> > diff-delta.c code.  Repacking again the same Linux kernel repository 
> > with the current code:
> That's unexpected, but I can see how this could be if most files have
> very few differences and are relatively small. For such cases, almost
> any hash will do, and the more complicated hashing will be more compute
> intensive.
> 
> 
> I have benchmarked my original diff code on a set of large files with
> lots of changes. These are hardest to get right, and hardest to get
> good performance with. Just try diffing any two large (uncompressed)
> tar files, and you'll see. On many of such large files, the new code
> is orders of magnitude faster. On these cases, the resulting deltas
> are also much smaller.
> 
> The comparison is a bit between a O(n^2) sort that is fast on small
> or mostly sorted inputs (but horrible on large ones) and a more
> complex O(nlogn) algorithm that is a bit slower for the simple
> cases, but far faster for more complex cases.

Can't you just switch between different delta algorithms based on some heuristic like the blob size?

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
Previous: Rutger NijlunsingNext: Geert Bosch
Message 26 of 32 in “RFC: New diff-delta.c implementation”
  1. Geert BoschApr 21, 2006
  2. Nicolas PitreApr 22, 2006
  3. Geert BoschApr 22, 2006
  4. Junio C HamanoApr 22, 2006
  5. Geert BoschApr 22, 2006
  6. Nicolas PitreApr 22, 2006
  7. Geert BoschApr 22, 2006
  8. Junio C HamanoApr 22, 2006
  9. Geert BoschApr 22, 2006
  10. Junio C HamanoApr 22, 2006
  11. Nicolas PitreApr 22, 2006
  12. Geert BoschApr 22, 2006
  13. Junio C HamanoApr 22, 2006
  14. Nicolas PitreApr 22, 2006
  15. Davide LibenziApr 22, 2006
  16. Geert BoschApr 22, 2006
  17. Rene ScharfeApr 22, 2006
  18. Geert BoschApr 24, 2006
  19. Nicolas PitreApr 24, 2006
  20. Geert BoschApr 24, 2006
  21. Nicolas PitreApr 24, 2006
  22. Geert BoschApr 24, 2006
  23. Geert BoschApr 24, 2006
  24. Geert BoschApr 24, 2006
  25. Rutger NijlunsingApr 24, 2006
  26. Petr BaudisApr 24, 2006
  27. Geert BoschApr 24, 2006
  28. Rene ScharfeApr 25, 2006
  29. Davide LibenziApr 22, 2006
  30. Geert BoschApr 23, 2006
  31. Davide LibenziApr 24, 2006
  32. Geert BoschApr 24, 2006

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.