Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: nmm1@cus.cam.ac.uk (Nick Maclaren)
Subject: Re: Cache, performance, and data structures used by simulations
Date: 2 Mar 1995 23:05:47 GMT	[thread overview]
Message-ID: <3j5j0b$b8n@lyra.csx.cam.ac.uk> (raw)
In-Reply-To: 3j301q$lue@larry.rice.edu

In article <3j301q$lue@larry.rice.edu>,
Vivek Sadananda Pai <vivek@noel.cs.rice.edu> wrote:
>In article <3j0ljg$in7@agate.berkeley.edu>, peterm@tonks.EECS.Berkeley.EDU (Peter Mardahl) writes:
>
>|> 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.
>
>If your code uses the same element location from many arrays at
>the same time (or close to each other), you're probably better off
>switching to structures. The exact speedup you'll see depends on
>a number of factors including #cache conflicts, memory bandwidth,
>reuse, etc.

Um, yes, but there is another solution: make each array slightly
bigger than it needs to be, so that each starts on a different
cache slot.  This is done automatically (!) by some run-time systems,
where they keep chaining information on allocated blocks, and means
that it is the very devil to compare cache-dependent programs on
different systems.

I don't know any system that uses hashing to access cache slots,
but it was certainly proposed some decades ago.  Nowadays it would
be quite cheap to do, and it would really confuse such benchmarking!


Nick Maclaren,
University of Cambridge Computer Laboratory,
New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
Email:  nmm1@cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679


  reply	other threads:[~1995-03-02 23:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-01  2:19 Cache, performance, and data structures used by simulations Peter Mardahl
1995-03-01 23:30 ` Vivek Sadananda Pai
1995-03-02 23:05   ` Nick Maclaren [this message]
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