SPONSORED LINKS

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

thinkpad 760c speed



Hi all,

I recently got my 120MHz pentium 760c running linux (slackware 3.0.0,
linux 1.2.13).  It is maxed out with 40MB of memory.  Anyways, what is
puzzeling me is that it seems slower than I would've expected.  I know,
I know, I shouldn't complain about the speed of such a "fast" thinkpad,
but I'm trying to run some serious programs on it.

The thing is that it is at least 30-40% slower than a desktop 90MHz
pentium Intel machine we have around here.  Does that make sense?
Pardon my ignorance, but I'm quite new to PC hardware.  I was expecting
the thinkpad to be as fast or faster than the desktop machine.  The
Intel machine is running Solaris x86, but I doubt that makes too much
difference since my benchmark is just number crunching and not using
much memory.  Maybe the thinkpad has a really slow bus or slow memory?

I'm including a program below that some of you might be able to run for
me in some flavor of unix.

When I ran it I was getting about 6.7 to 7.7 MFLOPS (program prints this
out, I have no idea if they are meaningful numbers in the absolute
sense).  This morning I took out my expansion 32MB of memory and was
suddenly up to 9.5 MFLOPS.  After putting the memory back in I was still
at 9.5 MFLOPS.  Wierd.  Does this mean anything to anyone?

Is there some kind of low-level hardware control over memory wait states
or anything like that?  Could an intermittent memory connection have
slowed things down?  I'm confused.

In any case, it would be great if of some of you could run the following
program and send me your speed numbers along with system and
configuration information.  I'm trying to determine if my system is
behaving properly or is somehow crippled.

Thank you greatly in advance!

                                Lee Hetherington
                                ilh@lcs.mit.edu

Here is the program.  I was compiling it with gcc 2.7.0 with -O, but
that is the same way I compiled it on the 90MHz desktop machine running
Solaris x86.  I've also tried pgcc 2.7.2p-p17, but that doesn't seem to
make any difference.

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

#ifndef CLOCKS_PER_SEC
#define CLOCKS_PER_SEC	1000000
#endif

#define VECMAX		2000
#define NPASSES		80000

void MCIntTest(void);
double *d1t(int n);
void fd1t(double *a);

int
main(int argc, char ** argv)
{
    clock_t	tStart;
    clock_t	RanTime = 0;
    double 	flops, elapsed;

    tStart  = clock();
    MCIntTest();
    RanTime	= clock() - tStart;

    flops = 1.e-6*(float)(VECMAX*NPASSES*4);
    elapsed = (float)(RanTime)/CLOCKS_PER_SEC;

    /*** **/
    printf("Timing test: Monte carlo Integration\n");
    printf("Parameters:\n");
    printf("\tVector Length\t%d\n", VECMAX);
    printf("\tN_TimeSteps\t%d\n", NPASSES);
    printf("\tClock Speed\t%d\n", CLOCKS_PER_SEC);
    printf("\n");
    printf("Float Op (in Millions): %10.4f\n", flops);
    printf("Elapsed Time          : %10.4f\n", elapsed);
    printf("MFLOPS                : %10.4f\n", flops/elapsed);

    return (0);
}

void
MCIntTest()
{
    double *x = NULL, *z = NULL;
    double dt, k, xdt;
    double zfact, xshift;
    int np, ns, nPaths, nTimeSteps;

    nPaths = VECMAX;
    nTimeSteps = NPASSES;

    x = d1t(nPaths+1);    
    z = d1t(nPaths+1);

    dt = 0.05;
    k = 0.1;

    for (np =1; np <= nPaths; np++)
    {
	x[np] = 4.0;
	z[np] = 5.0;
    }

    zfact = exp(-k*dt);
    xshift = 1. -zfact;
    xdt = 0.01 * dt;

    for (ns=1; ns<= nTimeSteps; ns++)
	for (np = 1; np <= nPaths; np ++)
	{
	    z[np] = z[np] * zfact + x[np] * xshift;
	    x[np] += xdt;
	}

    fd1t(x);
    fd1t(z);
}

double*
d1t(int n1)
{
    double *p, *a;
    int i;
    if ((p= (double*) malloc(n1*sizeof(double))) == NULL)
    {
	fprintf(stderr, "d1t: cannot allocate space\n");
	exit(-1);
    }
    for (i = 0, a =p; i < n1; i++)
	*a++ = 0;
    return p;
}

void
fd1t(double *a)
{
    if (a)
	free(a);
}

-------------------------------------------------------------------------------