From owner-freebsd-questions Fri Feb 1 1:39:42 2002 Delivered-To: freebsd-questions@freebsd.org Received: from speechpro.com (crt-gw.infopro.spb.su [195.201.254.5]) by hub.freebsd.org (Postfix) with ESMTP id 64B7A37B404 for ; Fri, 1 Feb 2002 01:39:35 -0800 (PST) Received: from igorr by sysadm.stc with local (Exim 3.33 #1) id 16WaAe-0002D1-00 for freebsd-questions@FreeBSD.ORG; Fri, 01 Feb 2002 12:39:48 +0300 Date: Fri, 1 Feb 2002 12:39:47 +0300 From: Igor Roboul To: freebsd-questions@FreeBSD.ORG Subject: Re: PERL way too slow on cat operation; me wonders what is going on Message-ID: <20020201093947.GA1298@sysadm.stc> Reply-To: igorr@speechpro.com Mail-Followup-To: Igor Roboul , 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> User-Agent: Mutt/1.3.26i 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 On Thu, Jan 31, 2002 at 09:26:35PM -0600, 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 $_; > } %time ./t1 6.570u 1.391s 0:12.31 64.6% 19+275k 533+515io 0pf+0w %time ./t2 0.008u 1.321s 0:08.13 16.2% 74+221k 533+516io 0pf+0w %cat t1 cat test | ./cat.pl >test.res %cat t2 cat test | cat - >test.res %cat cat.pl #!/usr/bin/perl while(<>) { print; } %uname -a FreeBSD sysadm.stc 4.4-STABLE FreeBSD 4.4-STABLE #0: Thu Dec 20 17:42:47 MSK 2001 root@sysadm.stc:/usr/obj/usr/src/sys/SYSADM i386 %perl -v This is perl, version 5.005_03 built for i386-freebsd To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message