[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] MacPERL Performace vs. Intel Class systems



Sorry if this is a dup.  I posted it earlier and Tim responded, but I
didn't get a copy from the list even though my later post did give me a
copy.  RB.


>You all have correctly identified file system performance as the bottleneck.
>

  I guess all of you cannot be wrong.  However, I'm not so easy to
convince.    I do think that the file system on Mac is geared toward
binary/block IO and can suffer greatly doing text IO, depending on the
compiler/intrepreter.  I have not looked at the source of MacPERL an I know
many of you are intimate with the source.  If you say it cannot go faster,
I'm sure that is the case ;-)

  However, consider the following code:

/*
 *  TestIO for the CodeWarrior
 *
 */

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

void main(void)
{
        int i;
        time_t starttime,stoptime;
        FILE *out=fopen( "ctest.dat", "w" );

        if ( !out ) {
                printf ("Can't open ctest.dat\n");
                return;
                }

        printf ("Starting\n");
        time( &starttime);

        for( i=1; i <= 100000; i++) {
                fprintf( out, "%d\n", i);
                }

        time( &stoptime);


        printf ("%d Seconds elapsed time\n", stoptime-starttime);

}

This program creates the same file and runs in 1 to 2 seconds on my PowerPC
8100/100.  Tim's Perl scripts takes 25 seconds to create the same file.
(MacPerl 5.0.7r1m)  If the MacOS filesystem is the bottleneck, why is there
an order of magnitude difference?  I tend to use C if I need performance or
need to run repeatedly.  I like PERL for quick jobs that I don't run
frequently.

Here is some more food for thought:

  Just as an example, (not a bench mark by any means), I downloaded jdk1.1
( ~8.8MB) for windows on my Mac.  I wanted to get it to an NT box by the
easiest path.  We have a Solbourne SMP box running CAP, so I just dragged
the icon for the .exe file over.  The copy took about 1 minute from my
8100/100.  Then I went to the NT box (200 Mhz) and tried MS-IE to FTP it.
It was taking a long time so I aborted it after 5 minutes and tried
Netscape.  IT took 6 minutes to ftp it. Now I'm thinking something must be
very wrong because everybody says NT is so fast.  Netscape on the 8100/100
Mac took only 3 minutes to ftp it.  Again I tried the drag copy.  Only took
1 minute. Before reading this discussion, I attributed the difference on
scsi vs ide.  Just for fun, I transfered the same file by ftp from one DEC
alpha to another.  5 seconds :-)  So I knew the net itself wasn't the
bottle-neck, however, the NIC card on the NT vs the built in ethernet on
the Mac could be.


Regards,

Randy


******************************************************************************
Randy Bradley | Systems Analyst | US Meat Animal Research Center | Clay Center
Computer Spec.| 402-762-4156    | bradley@aux.marc.usda.gov      | Nebraska
******************************************************************************
"Around it!  Around it!  Confoundit.  Nobody gave me the specifications.  I
have to do everything myself around here."  Gopher-The Great Honeypot Robbery
----------------------------------------------------------------------------
-



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch