From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f57db,df5754e791c11702,start X-Google-Attributes: gidf57db,public X-Google-Thread: 1164f8,df5754e791c11702,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1995-03-02 04:39:41 PST Path: bga.com!news.sprintlink.net!cs.utexas.edu!swrinde!news.uh.edu!bti!news.sesqui.net!rice!vivek From: vivek@noel.cs.rice.edu (Vivek Sadananda Pai) Newsgroups: comp.benchmarks,comp.sys.dec Subject: Re: Cache, performance, and data structures used by simulations Date: 1 Mar 1995 23:30:01 GMT Organization: Rice University, Houston, Texas Distribution: world Message-ID: <3j301q$lue@larry.rice.edu> References: <3j0ljg$in7@agate.berkeley.edu> NNTP-Posting-Host: noel.cs.rice.edu Originator: vivek@noel.cs.rice.edu Xref: bga.com comp.benchmarks:2847 comp.sys.dec:9614 In article <3j0ljg$in7@agate.berkeley.edu>, peterm@tonks.EECS.Berkeley.EDU (Peter Mardahl) writes: |> |> 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. [...] My theory: The Alpha uses 8k direct-mapped first level caches to do its work. I don't know what the HP uses. In the case of the structure-based code, everything you want for a given element is pulled in at the same time. In the case of the array-based code, bad things can happen. For example, assume that all of your arrays start on page boundaries. In this case, if you want to access the same element location from all the arrays, they'll map to the same line of the first level cache, potentially causing lots and lots of cache conflicts. In this case, the larger (and more highly associative) second-level cache gets used to supply the data. So, it's probably not an issue of memory bandwidth, but secondary-to-primary cache bandwidth. It might also involve the main memory bandwidth, but without a lot more information, I can't be sure (not that I could, even with a lot more information). |> 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. |> Please Cc: me any followups. I tried, but something seems to be poorly configured at your end. I got the following mailer-daemon error: 554 MX list for tonks.eecs.berkeley.edu. points back to langmuir.EECS.Berkeley.EDU 554 ... Local configuration error Hope this helps, -Vivek