Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jan 2002 23:09:50 -0600
From:      Steven A <salyari@cs.uchicago.edu>
To:        parv <parv_@yahoo.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: PERL way too slow on cat operation; me wonders what is going on
Message-ID:  <20020131230950.B15426@abyss.cs.uchicago.edu>
In-Reply-To: <20020201050637.GA4068@moo.holy.cow>; from parv_@yahoo.com on Fri, Feb 01, 2002 at 12:06:37AM -0500
References:  <20020131212634.A13452@abyss.cs.uchicago.edu> <20020201050637.GA4068@moo.holy.cow>

next in thread | previous in thread | raw e-mail | index | archive | help
yea it is a typo

oops

this doesnt change anything, i still have the problem


cat 80megfile.ps | perl cat.pl > output.ps

vs

cat 80megfile.ps | cat - > output.ps


the first takes 8 minutes the second takes 3 seconds.


yours,steve


well what version of bsd are you using? did you compile your kernel etc.
what hardware. 

yours,
steve


On Fri, Feb 01, 2002 at 12:06:37AM -0500, parv wrote:
> in message <20020131212634.A13452@abyss.cs.uchicago.edu>, 
> wrote Steven A thusly...
> >
> > hi,
> > 
> > first of all, my uname -a: FreeBSD oberon.cs.uchicago.edu
> > 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Tue Sep 18 11:57:08 PDT 2001
> > murray@builder.FreeBSD.org:/usr/src/sys/compile/GENERIC  i386
> > 
> > now:
> > 
> > the following perl script takes 8 minutes to execute on both of my
> > freebsd systems (two AMD K6-2 300s):
> > 
> > cat 80megfile.ps > perl cat.pl > output.ps
> > 
> > cat.pl:
> > while($_ = <STDIN>) {
> >         print $_;
> > }
> 
> > however,
> > 
> > cat 80megfile.ps > cat - > output.ps
> > 
> > takes 2 seconds on the same system.
> > 
> > running that perl script on a debian system takes a few seconds
> > also as does the cat -.
> 
> for one thing is the first ">" a typo? shouldn't that be a pipe...
> 
> cat file | cat - > anotherfile
> cat file | perl cat.perl > otherfile
> 
> ...in any case, it took me 19-20 seconds w/ both the pipe lines,
> unlike the disparity that you are seeing.  btw, i used perl 5.6.1.
> 
> 
> -- 
>  

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020131230950.B15426>