Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Mar 2002 10:28:49 +0000
From:      Burhan Nazir <burhan@blueyonder.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: slow perl string concats on FreeBSD 4.5
Message-ID:  <20020308102849.GI54208@swansea.cableinet.net>
In-Reply-To: <3C881349.66044A1B@preston.pinemeadowgolf.com>
References:  <3C881349.66044A1B@preston.pinemeadowgolf.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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" <raistlin@preston.pinemeadowgolf.com>
> 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: <freebsd-questions.FreeBSD.ORG>
> List-Archive: <http://docs.freebsd.org/mail/>; (Web Archive)
> List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions)
> List-Subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-questions>
> List-Unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-questions>
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020308102849.GI54208>