summaryrefslogtreecommitdiff
path: root/t/t7501-commit.sh
diff options
context:
space:
mode:
authorLibravatar René Scharfe <rene.scharfe@lsrfire.ath.cx>2009-01-10 00:18:34 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-01-09 21:35:56 -0800
commitc822255cfc1ac83daeeeee1647e3c775450c830c (patch)
treeae2027aed5ead1df39b4da3067300bd80e6cd1bc /t/t7501-commit.sh
parentgrep -w: forward to next possible position after rejected match (diff)
downloadtgif-c822255cfc1ac83daeeeee1647e3c775450c830c.tar.xz
grep: don't call regexec() for fixed strings
Add the new flag "fixed" to struct grep_pat and set it if the pattern is doesn't contain any regex control characters in addition to if the flag -F/--fixed-strings was specified. This gives a nice speed up on msysgit, where regexec() seems to be extra slow. Before (best of five runs): $ time git grep grep v1.6.1 >/dev/null real 0m0.552s user 0m0.000s sys 0m0.000s $ time git grep -F grep v1.6.1 >/dev/null real 0m0.170s user 0m0.000s sys 0m0.015s With the patch: $ time git grep grep v1.6.1 >/dev/null real 0m0.173s user 0m0.000s sys 0m0.000s The difference is much smaller on Linux, but still measurable. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7501-commit.sh')
0 files changed, 0 insertions, 0 deletions