[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] RaQ2: diabolically slow Perl
- Subject: [cobalt-users] RaQ2: diabolically slow Perl
- From: "Dylan Smith" <dyls@xxxxxxx>
- Date: Mon Jul 16 22:45:01 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
All,
Is there any way to speed up the initialization of Perl programs on a RaQ2?
It really is unacceptably slow once you have any "use" statements in your
Perl code.
I believe a RaQ2 has a Mips R4000 processor running at 250MHz. To show you
how slow the RaQ2 is, here's a comparison between the RaQ2 and a
PentiumII-266. Both are running Linux, both have 64MB RAM, neither is under
load or swapping when this test is run.
To do this, I wrote a Perl script as follows:
#!/usr/bin/perl
use FileHandle;
use Carp;
use Socket;
print ("Done\n");
and saved it as test.pl, and made it executable.
To time it, I used the "time" command on both systems:
$ time test.pl
On the Pentium 266, the script took 0.22 seconds to invoke. On the RaQ2, it
took 1.29 seconds to invoke - six times slower! Also, CPU was at 100% while
the script was loading. Re-running the script several times on the RaQ2
didn't speed it up, so it wasn't that it was not in cache.
Going from Perl 5.004 to 5.6 on the RaQ2 has not speeded things up, either.
Also, Perl scripts load and execute quickly on the RaQ2 if no "use"
statements are used. Sadly, this is not an option for most of my scripts.
Has anyone managed to speed this up on a RaQ2, and if so, how? Or is it just
a case of hopeless hardware?