Re: Why Git is so fast
From: Jakub Narebski <hidden>
Date: 2016-06-15 22:46:41
On Thu, 30 Apr 2009, Nicolas Pitre wrote:
On Thu, 30 Apr 2009, Jakub Narebski wrote:quoted
Jakub Narebski [off-list ref] writes:
quoted
es> Maybe Git is fast because every time they faced one of these "buy es> vs. build" choices, they decided to just write it themselves. I don't think so. Rather the opposite is true. Git uses libcurl for HTTP transport. Git uses zlib for compression. Git uses SHA-1 from OpenSSL or from Mozilla. Git uses (modified, internal) LibXDiff for (binary) deltaifying, for diffs and for merges.Well, I think he's right on this point as well. [...] The fact that libxdiff was made internal is indeed to have a better impedance matching with the core code, otherwise it could have remained fully external just like zlib. And the binary delta code is not libxdiff anymore but a much smaller, straight forward, and optimized to death version to achieve speed over versatility (no need to be versatile when strictly dealing with Git's needs only).
Hrmmmm... I have thought that LibXDiff was internalized mainly for ease of modification, as my impression is that LibXDiff is single developer effort, while Git from beginning have many contributors (and submodules didn't exist then). If I remember correctly the rcsmerge/diff3 algorithm was added first in internalized git's xdiff... was it added to LibXDiff proper, anyway? BTW. I wonder what other F/OSS version control systems: Bazaar, Mercurial, Darcs, Monotone use for binary deltas, for diff engine, and for textual three-way merge engine. Hmmm... perhaps I'll ask on #revctrl -- Jakub Narebski Poland