RedHat 7.0 sed speed is slow

Gerald Combs gerald at ethereal.com
Mon Jul 9 22:50:26 CDT 2001


On Mon, 9 Jul 2001, Woo, David wrote:

> I'm transferring a shell application from SCO 5.0.5 to RedHat 7.0.  Of all
> the things that I thought I 
> would have no problems with, I never thought that the speed of the sed
> command on SCO would 
> run 4 times faster than the one on RedHat!  The original sed on SCO had been
> running slowly - so I 
> had compiled the GNU version of sed on SCO - and had reduced the execution
> time from 3 hours 
> to 40 minutes.
> 
> Now I have transferred the exact same script that calls sed extensively from
> SCO to the standard, 
> stock RedHat 7.0 distribution - I find that the RedHat sed is running 4
> times slower than than the 
> SCO GNU version of sed - just like the original SCO sed.  Isn't the version
> that comes with RedHat 
> the GNU version already?  The RPM reveals that RedHat sed is "sed 3.02-8".
> 
> I'm such a newbie that I don't even know how to update to the latest version
> of sed - and don't 
> know if it would help?
> 
> What am I missing?

I searched Google for "gnu sed slow" and found this:

  http://mail.gnu.org/pipermail/bug-gnu-utils/2000-February/000872.html

According to the message, GNU sed compiled with the GNU regex library
is fairly slow.  GNU regex appears to be a part of GNU libc, so getting
a copy of sed compiled on a RH 7.0 box without GNU regex is likely to
be non-trivial.

How difficult would it be to port your sed scripts to perl or python?
Perl has its own (fast) regular expression facility.

> 
> TIA.
> David.
> 
> 
> 




More information about the Kclug mailing list