Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: peterm@tonks.EECS.Berkeley.EDU (Peter Mardahl)
Subject: Cache, performance, and data structures used by simulations
Date: 1 Mar 1995 02:19:28 GMT	[thread overview]
Message-ID: <3j0ljg$in7@agate.berkeley.edu> (raw)


This is really a question.  

We have been benchmarking a series of codes on different architectures.
The two of most interest to us are AlphaStation 200 4/233 and
HP 712/80.  Both have 256k cache.  I do not know the memory bandwidth
of the HP, the AlphaStation's is 132MB/s.  No swapping took place.

We benchmarked two different codes on these systems, both scientific
simulation programs.

One of them gave a performance on each machine consistent with expectations
based on SPECfp.  (i.e., The alphastation was as much faster as we'd expect
from SPECfp than the hp)

The other code performed very badly on the Alphastation, it ran slightly
SLOWER than the HP.  (We expect the Alphastation to be 60% faster)

The two codes perform nearly identical calculations, however they use
different datastructures:

One uses a structure like this for a particle:

typedef struct {
    double x,y;
    double v1,v2,v3;
} particle;

particle *particles;  /*  array has dimension #particles */

The other one stores this information like this:

double *x, *y, *v1, *v2, *v3; /* each array has dimension #particles */

Each code updates each particle in sequence, and accesses all the fields.

We can't benchmark the two codes against each other, apples and oranges....
But the structure-based code gets just exactly the performance you'd expect
from SPECfp while the array-based code does not.

Our theory to explain this:

The HP has a much better memory bandwidth/CPU speed ratio than the DEC

The DEC can more efficiently cache the structure-based code than it can
the array-based code, keeping the cpu busier, so it performs as expected,

but

the dec can't cache the array-based code as well, so it performs badly
compared to the HP with its better memory-bandwidth.


What do you all think?  Are we right?  Do you have a better theory?
It's important that we know, because we may switch the array-based
code over to structures if we can get a 30-60% speedup out of it.

Please Cc: me any followups.


Regards,

Peter Mardahl



             reply	other threads:[~1995-03-01  2:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-01  2:19 Peter Mardahl [this message]
1995-03-01 23:30 ` Cache, performance, and data structures used by simulations Vivek Sadananda Pai
1995-03-02 23:05   ` Nick Maclaren
1995-03-04 19:01     ` John L. Henning
1995-03-06 20:08     ` Vivek Sadananda Pai
1995-03-13 18:10     ` Paul Repacholi
1995-03-02 18:03 ` John L. Henning
1995-03-03 16:52   ` Greg Lindahl
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox