diff options
author | Fredrik Kuivinen <frekui@gmail.com> | 2010-01-25 23:51:39 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-26 09:20:07 -0800 |
commit | 5b594f457afcf2cdddb3c79de8bcc571c775aa55 (patch) | |
tree | d3014dfa67180a040e0b542f7e46a1f38321158e /t | |
parent | grep: expose "status-only" feature via -q (diff) | |
download | tgif-5b594f457afcf2cdddb3c79de8bcc571c775aa55.tar.xz |
Threaded grep
Make git grep use threads when it is available.
The results below are best of five runs in the Linux repository (on a
box with two cores).
With the patch:
git grep qwerty
1.58user 0.55system 0:01.16elapsed 183%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+800outputs (0major+5774minor)pagefaults 0swaps
Without:
git grep qwerty
1.59user 0.43system 0:02.02elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+800outputs (0major+3716minor)pagefaults 0swaps
And with a pattern with quite a few matches:
With the patch:
$ /usr/bin/time git grep void
5.61user 0.56system 0:03.44elapsed 179%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+800outputs (0major+5587minor)pagefaults 0swaps
Without:
$ /usr/bin/time git grep void
5.36user 0.51system 0:05.87elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+800outputs (0major+3693minor)pagefaults 0swaps
In either case we gain about 40% by the threading.
Signed-off-by: Fredrik Kuivinen <frekui@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
0 files changed, 0 insertions, 0 deletions