From owner-freebsd-questions Thu Jan 31 19:53:48 2002 Delivered-To: freebsd-questions@freebsd.org Received: from laime.cs.uchicago.edu (laime.cs.uchicago.edu [128.135.11.244]) by hub.freebsd.org (Postfix) with ESMTP id 6A7B437B400 for ; Thu, 31 Jan 2002 19:53:44 -0800 (PST) Received: from abyss.cs.uchicago.edu (postfix@abyss.cs.uchicago.edu [128.135.11.27]) by laime.cs.uchicago.edu (8.10.2/8.9.3) with ESMTP id g113rhs13155; Thu, 31 Jan 2002 21:53:43 -0600 (CST) Received: by abyss.cs.uchicago.edu (Postfix, from userid 10561) id DCFB05AA1E; Thu, 31 Jan 2002 21:53:42 -0600 (CST) Date: Thu, 31 Jan 2002 21:53:42 -0600 From: Steven A To: Nick Rogness Cc: freebsd-questions@freebsd.org Subject: Re: PERL way too slow on cat operation; me wonders what is going on Message-ID: <20020131215342.A13853@abyss.cs.uchicago.edu> References: <20020131214829.B13658@abyss.cs.uchicago.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from nick@rogness.net on Thu, Jan 31, 2002 at 09:55:23PM -0600 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 that don't make a difference. it's not a perl code problem as far as im concerned. i run the same code on debian and it takes 3 seconds. i think it's some kind of freebsd-perl problem or an installation problem. i encourage everyone to find an 80 meg file and then try running the script on it. yours, steve On Thu, Jan 31, 2002 at 09:55:23PM -0600, Nick Rogness wrote: > On Thu, 31 Jan 2002, Steven A wrote: > > > heh, i am just paranoid. > > Um, the $|=1; tells perl to autoflush STDOUT. It is not a > dangerous command (that I know of). > > > > > -steve > > > > > > On Thu, Jan 31, 2002 at 09:51:57PM -0600, Nick Rogness wrote: > > > On Thu, 31 Jan 2002, Steven A wrote: > > > > > > > leave my computers alone! > > > > > > ? Um did I miss something? > > > > > > > > > > > -steve > > > > > > > > On Thu, Jan 31, 2002 at 09:39:21PM -0600, Nick Rogness wrote: > > > > > On Thu, 31 Jan 2002, Steven A wrote: > > > > > > > > > > > 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 $_; > > > > > > } > > > > > > > > > > try cat.pl as: > > > > > > > > > > $|=1; > > > > > > > > > > while () { > > > > > print $_; > > > > > } > > > > > > > > > > > > > > > Nick Rogness > > > > > - Don't mind me...I'm just sniffing your packets > > > > > > > > > > Nick Rogness > > > - Don't mind me...I'm just sniffing your packets > > > > Nick Rogness > - Don't mind me...I'm just sniffing your packets To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message