From owner-freebsd-questions Thu Mar 7 16:50:19 2002 Delivered-To: freebsd-questions@freebsd.org Received: from famine.e-raist.com (famine.e-raist.com [65.100.40.90]) by hub.freebsd.org (Postfix) with ESMTP id 7329737B402 for ; Thu, 7 Mar 2002 16:50:15 -0800 (PST) Received: from preston.pinemeadowgolf.com ([206.163.112.110]) (authenticated bits=0) by famine.e-raist.com (8.12.2/8.12.2) with ESMTP id g280oBNb056699 for ; Thu, 7 Mar 2002 16:50:16 -0800 (PST) Message-ID: <3C881349.66044A1B@preston.pinemeadowgolf.com> 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 MIME-Version: 1.0 To: freebsd-questions@FreeBSD.ORG Subject: slow perl string concats on FreeBSD 4.5 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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'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