From owner-freebsd-questions Thu Jan 31 21: 4:39 2002 Delivered-To: freebsd-questions@freebsd.org Received: from avocet.prod.itd.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by hub.freebsd.org (Postfix) with ESMTP id AF13A37B405 for ; Thu, 31 Jan 2002 21:04:35 -0800 (PST) Received: from sdn-ar-007dcwashp301.dialsprint.net ([63.178.90.167] helo=moo.holy.cow) by avocet.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16WVsH-00055N-00; Thu, 31 Jan 2002 21:04:34 -0800 Received: by moo.holy.cow (Postfix, from userid 1001) id 9C7E050BA8; Fri, 1 Feb 2002 00:06:37 -0500 (EST) Date: Fri, 1 Feb 2002 00:06:37 -0500 From: parv To: Steven A Cc: freebsd-questions@freebsd.org Subject: Re: PERL way too slow on cat operation; me wonders what is going on Message-ID: <20020201050637.GA4068@moo.holy.cow> Mail-Followup-To: Steven A , freebsd-questions@freebsd.org References: <20020131212634.A13452@abyss.cs.uchicago.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020131212634.A13452@abyss.cs.uchicago.edu> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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($_ = ) { > 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