From owner-freebsd-questions Fri Mar 8 2:29: 3 2002 Delivered-To: freebsd-questions@freebsd.org Received: from swansea.cableinet.net (swansea.cableinet.net [194.117.142.65]) by hub.freebsd.org (Postfix) with ESMTP id B47CA37B405 for ; Fri, 8 Mar 2002 02:28:57 -0800 (PST) Received: (from bnazir@localhost) by swansea.cableinet.net (8.11.6/8.11.6) id g28ASn961820 for freebsd-questions@freebsd.org; Fri, 8 Mar 2002 10:28:49 GMT (envelope-from bnazir) Date: Fri, 8 Mar 2002 10:28:49 +0000 From: Burhan Nazir To: freebsd-questions@freebsd.org Subject: Re: slow perl string concats on FreeBSD 4.5 Message-ID: <20020308102849.GI54208@swansea.cableinet.net> References: <3C881349.66044A1B@preston.pinemeadowgolf.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C881349.66044A1B@preston.pinemeadowgolf.com> User-Agent: Mutt/1.3.27i 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 I tried your code on two machines, one running freebsd4.4, the other a red hat 7.1 install (similar hardware config). Freebsd=36seconds RedHatLinux=6 seconds I am not sure why there is such a big difference in speed. Anyone got any answers for this? -Burhan Raistlin A. Majere wrote: > Delivered-To: freebsd-questions@freebsd.org > Date: Thu, 07 Mar 2002 17:26:33 -0800 > From: "Raistlin A. Majere" > X-Mailer: Mozilla 4.76 [en] (Win98; U) > X-Accept-Language: en > To: freebsd-questions@freebsd.org > Subject: slow perl string concats on FreeBSD 4.5 > List-ID: > List-Archive: (Web Archive) > List-Help: (List Instructions) > List-Subscribe: > List-Unsubscribe: > X-Loop: FreeBSD.ORG > Precedence: bulk > > I'm trying use perl on FreeBSD and am having huge performance issues. I > took a script off a linux machine and ran it on my new FreeBSD machine > and what took 9 seconds on linux is taking 56 seconds on FreeBSD. The > machines run identical hardware and both run perl 5.6.1. > > I wrote a little test program to demonstrate the differences in speed of > execution. Does anyone know how to make perl concat strings more > efficiently? > > #!/usr/bin/perl > > $result =""; > $begin = time; > for ($i = 0; $i < 1000000;) { > $i++; > > #comment the following line to get freebsd perl to run as fast as linux > perl > $result .= "$i\n"; > } > $duration = time - $begin; > print "duration = $duration.\n"; > > > Any ideas? > > -=Raistlin Alexander Majere > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message