In 2006 Jo Vermeulen compared Bazaar and Git performance-wise. Up to today Bazaar has a bad reputation regarding speed and from the results of Jo you see at least that Git is incredibly fast, Bazaar is usable but a bit slow on the uptake in some scenarios. Jo strictly did not use any remote operations which are hard to compare, but from some own tests I do know that Git is incredibly fast there, too, while Bazaar can be really slow on the initial clone operations. The latter fact may be history now, as the new 2a repository format has been introduced with Bazaar 1.17 and enabled by default in 2.0 (both are in Portage). It gives improved speed and flexibility while using up a bit more disk space than the old formats.
Back to what we are really looking at: The scenario. Operations chosen by Jo were:
- Repository initialisation
- Adding of a Linux kernel tree
- Diffing (not possible with current Git)
- Commit of many files (whole kernel tree)
- Diff on empty changeset
- Output of status information
- Small commit
The results were clearly in favour of Git, especially the empty diff was quite awkard for Bazaar. The same operations were done by Jordan Mantha in 2008, also including Mercurial in a follow-up.
A clever idea by Jordan was to provide time ratios, as test environments and settings were a bit different (other kernel version, different computer system). He concluded that Bazaar got faster, so did Git, but in the end Bazaar gained more ground. So now is the time to repeat the tests with current versions of both SCM systems, the following table only has the ratios of the other two guys.
You will note that Git is mostly faster than Bazaar (apart from the add operation), but the absolute time of Bazaar is more than sufficient (got faster since 2006 and 2008) and outweighed by its better user interface in my eyes. Ranked by used space Git (471MB) wins, followed by Bazaar (482MB) and Mercurial (554MB); the numbers are for the whole tree including working tree.
The used versions are given in the table, all times in seconds. For the sake of completeness, Mercurial is also listed in the table and compared to the ratios Jordan reached.
Edit: I corrected the repository sizes because Git's gc command gives a good improvement in repository size. Additionally I should add that no custom options were used, just the straight commands.
|
Task |
Git 1.6.4.2 |
Bazaar 2.0 RC1 |
Ratio |
Ratio Git 1.5.4.3/Bzr 1.3.1 |
Ratio Git 0.99.9c/Bzr 0.7pre |
Mercurial 1.3.1 |
Ratio |
Ratio Git 1.5.4.3/Bzr 1.3.1/Hg 0.9.5 |
|
Initialization |
0.008 |
0.783 |
0.010 |
0.257 |
0.100 |
0.265 |
1 : 97.88 : 33.13 |
1: 3.88 : 1.59 |
|
Adding files |
14.612 |
6.556 |
2.229 |
2.930 |
1.320 |
1.867 |
7.83 : 3.51 : 1 |
5.65 : 1.92 : 1 |
|
Committing large changes |
5.270 |
52.685 |
0.100 |
0.410 |
0.440 |
41.836 |
1 : 10 : 7.94 |
1 : 2.41 : 1.68 |
|
Diffing no changes |
0.110 |
0.182 |
0.604 |
0.007 |
0.00025 |
0.731 |
1 : 1.66 : 6.65 |
1 : 138 : 3.91 |
|
Getting repo status |
0.313 |
0.818 |
0.383 |
0.305 |
0.022 |
0.630 |
1 : 2.61 : 2.01 |
1.14 : 3.74 : 1 |
|
Small commit |
0.338 |
1.282 |
0.264 |
0.044 |
0.058 |
1.278 |
1 : 3.79 : 3.78 |
1 : 22.7 : 4.82 |
| < Zurück | Weiter > |
|---|





Kommentare
- What were you doing with diffing that you said git couldn't do it?
- Adding the whole tree and then doing diff gives no output for Git.
Or do you mean you just did "git diff"? This could not have worked the way you seem to expect: it is meant to produce a diff between your working directory and index (aka staging area, used for creation of a commit). As you didn't change anything since you put the files into repository, there will be nothing to show!
All that said, there is a way to get the very first commit as a patch: git format-patch --root first-commit
And it exists exactly because of this: getting everything as a patch (diff -u output) for data exchange.