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

Re: RFC: New diff-delta.c implementation

From
GBGeert Bosch <bosch@adacore.com>
Date
Apr 24, 2006, 16:31 UTC
Message-ID
<D1E1F442-2CE8-4CA0-A6E6-94B8FFC5E82D@adacore.com>
In-Reply-To
<Pine.LNX.4.64.0604241123490.18520@localhost.localdomain>
> Sure, but the data buffers aren't necessarily so.  At least some  
> code to
> align index_step with actual memory offset if necessary should be
> considered.

I don't quite understand. Do you mean that if I mmap a file, I can't count on the memory being word-aligned? Note that I traverse the target buffer byte-by-byte, but the matches in the source buffer are always aligned to index_step. Doing a word load there instead of individual byte loads actually is a significant speedup on PPC, and most other non-Intel platforms.

> Indeed.  And since the primary goal for GIT is to manage relatively
> small files with relatively few differences then we have to  
> optimize for
> that case while trying to simply limit the dammage in the other cases.

Yes, I'll look at those now. Also, comparing one index against 10 target files may change the profile quite a bit. The new algorithm spends most time on indexing, but when comparing against many files, the find_copy part suddenly becomes dominant.

Show 5 quoted lines
> Well, I did lots of benchmarks too over the Linux kernel repository
> with the current code.  It is of course a dataset quite different from
> two large files.  And simply increasing the hash size to improve on  
> pack
> size did increase CPU usage quite significantly.

BTW, I still get: potomac%git-rev-list --objects e64961b0573b0e72bd55eab6d36bd97f859f9516 | ./git-pack-objects --no- reuse-delta --stdout Generating pack... Done counting 17005 objects. Deltifying 17005 objects. 100% (17005/17005) done fatal: delta size changed (This is for my git.git tree.)

Show 5 quoted lines
>> PS. Somehow your code had "double line spacing" :)
> Gah.  Your original version must have CRLF line terminations, and vi
> simply notice that and writes the file back with CRLF by default.   
> Find
> attached a version with those converted to LF only.

Strange, my platform doesn't use CRLF, and my sources all have pristine LF line terminations.

   -Geert
Previous: Nicolas PitreNext: Geert Bosch
Message 22 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.