bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Slow execution of my build of grep


From: eo rojas
Subject: Slow execution of my build of grep
Date: Thu, 26 Jul 2007 13:21:13 -0700

I appogize if this is covered somewhere, but as is typical for GNU stuff I
have looked around and not found the info.  I built my own grep by pulling
down the couse but my version runs some 30 times slower and a very large
file I am grepping.  I did not install it, but I am running it out of build
directory.
After running ./confugre I had CFLAGS with -g -O2, which I tried changing to
-O3, to no avail.

Here is the verision info:
---
 mygrep --version
grep (GNU grep) 2.5

Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

----
grep --version
grep (GNU grep) 2.5.1

Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
----
Here is a make output line for grep.c after I change to "-O3"
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl -I../lib
-DLOCALEDIR=\"/usr/local/share/locale\"    -O3 -c `test -f grep.c || echo
'./'`grep.c
-----

What I was trying to do.

I comonly want to pass a very long list of files to grep.  I use find to
generate a list of files but I also filter these to exclude some paths.  The
list is fairly static.  I understand I could use the new options --include,
and --exclude options along with --recurse to get the same effect, but I
want to use this list directly.  So I pulled down the code to see how
difficult this feature would be to add, it is looks very easy to do except
for this performance issues.

Thanks,
emilio

-- 
------
emilio


reply via email to

[Prev in Thread] Current Thread [Next in Thread]