Re: [PATCH] git gc: Speed it up by 18% via faster hash comparisons
- From
- Ingo Molnar <mingo@elte.hu>
- Date
- Apr 28, 2011, 10:36 UTC
- Message-ID
- <20110428103650.GA18530@elte.hu>
- In-Reply-To
- <20110428063625.GB952@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
Show 13 quoted lines
> Having said that, it would be nice if someone could test these two patches on a > modern AMD box, using the perf stat from here: > > http://people.redhat.com/mingo/tip.git/README > > cd tools/perf/ > make -j install > > and do something like this to test git gc's performance: > > $ perf stat --sync --repeat 10 ./git gc > > ... to see whether these speedups are generic, or somehow Intel CPU specific.
To follow up on this angle, i've now tested both 'git gc' performance improvement patches on an Opteron box:
# # Before: #
Performance counter stats for './git gc' (10 runs):
6400.903957 task-clock # 0.977 CPUs utilized ( +- 0.09% )
1,537 context-switches # 0.000 M/sec ( +- 3.12% )
118 CPU-migrations # 0.000 M/sec ( +- 7.08% )
40,879 page-faults # 0.006 M/sec ( +- 0.03% )
14,768,724,649 cycles # 2.307 GHz ( +- 0.09% )
9,185,135,676 instructions # 0.62 insns per cycle ( +- 0.08% )
1,883,860,739 branches # 294.312 M/sec ( +- 0.16% )
99,800,253 branch-misses # 5.30% of all branches ( +- 0.34% )6.548348691 seconds time elapsed ( +- 1.01% )
# # After: #
Performance counter stats for './git gc' (10 runs):
6078.191492 task-clock # 0.979 CPUs utilized ( +- 0.09% )
1,511 context-switches # 0.000 M/sec ( +- 2.85% )
104 CPU-migrations # 0.000 M/sec ( +- 6.29% )
41,410 page-faults # 0.007 M/sec ( +- 0.04% )
14,024,602,415 cycles # 2.307 GHz ( +- 0.09% )
<not counted> stalled-cycles
11,364,757,635 instructions # 0.81 insns per cycle ( +- 0.06% )
2,612,173,056 branches # 429.762 M/sec ( +- 0.09% )
109,257,789 branch-misses # 4.18% of all branches ( +- 0.74% )6.209749362 seconds time elapsed ( +- 0.51% )
So they bring an about +5.3% improvement.
Thanks,
Ingo