This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
use of cut in guile-doc-snarf
- To: guile at sourceware dot cygnus dot com
- Subject: use of cut in guile-doc-snarf
- From: Brad Knotwell <knotwell at ix dot netcom dot com>
- Date: Tue, 20 Jun 2000 07:33:31 -0700 (PDT)
Hello all--
I was poking around at guile-doc-snarf and figured out why it takes such
a long time. In general, the following sed command takes an extremely
long time to complete:
sed 's/^\(.\{128\}.\{128\}.\{128\}.\{128\}.\{128\}.\{128\}.\{128\}.\{128\}\).*/\1/g'
As far as I can tell, the whole purpose of this command is to cut a line down
to 1024 characters in length. Is there any reason not to do something like
the following instead:
cut -c1-1023
The time difference is astounding--a 13000 line file using the
sed command took 22s on my machine while the cut command took about 0.05s.
Overall, changing this one line cut my build time down from 1083s to 334s.
Is there any reason not to use cut for this instead?
--Brad