Git is fast. Everyone—even most of the hard core users of these
other systems—generally give Git this title. With Git, all
operations are performed locally giving it a bit of a leg up on
SVN and Perforce, both of which require network access for certain operations.
However, even compared to the other DSCMs that also perform operations
locally, Git is pretty fast.
Part of this is likely because it was built to work on the Linux
kernel, which means that it has had to deal effectively with large
repositories from day one. Additionally, Git is written in C, reducing the
overhead of runtimes associated with higher-level languages.
Another reason that Git is so fast is that the primary developers
have made this a design goal of the application.
The following are a number of benchmarks that I performed on three
copies of the Django source code repository in 3 different SCMs:
Git, Mercurial and Bazaar. I also tested some of this stuff in SVN,
but trust me, it's slower—basically take the Bazaar numbers and
then add network latency...
The end result was that for everything but adding new files, Git
was fastest. (Also really large commits, which Hg was basically the
same at, but the commit I tested was so large that you're unlikely
to ever do anything like it—normal commits are much faster in Git.)
The cold and hot branching numbers are the numbers for the first
and second times that I branched a repo—the second number being
a branch with a hot disk cache.
It should be noted that although the 'add' numbers are much slower,
this was for a massive add operation—over 2000 files. For the
majority of what most people do on a daily basis, add ops in any
of these systems will only take a fraction of a second. All of the
other ops tested here (except for the large commit, possibly) are
more indicative of things you might actually do day to day.
These numbers are really not difficult to recreate, simply clone the Django
project in each of the systems and try out the same commands in each.
git clone git://github.com/brosner/django.git dj-git
hg clone http://hg.dpaste.com/django/trunk dj-hg
bzr branch lp:django dj-bzr
svn checkout http://code.djangoproject.com/svn/django/trunk dj-svn