Date: Thu, 07 Mar 2002 17:26:33 -0800 From: "Raistlin A. Majere" <raistlin@preston.pinemeadowgolf.com> To: freebsd-questions@FreeBSD.ORG Subject: slow perl string concats on FreeBSD 4.5 Message-ID: <3C881349.66044A1B@preston.pinemeadowgolf.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C881349.66044A1B>
