From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,df5754e791c11702 X-Google-Attributes: gid1164f8,public X-Google-Thread: f57db,df5754e791c11702 X-Google-Attributes: gidf57db,public X-Google-ArrivalTime: 1995-03-02 21:57:56 PST Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!oleane!pipex!lyra.csx.cam.ac.uk!nmm1 From: nmm1@cus.cam.ac.uk (Nick Maclaren) Newsgroups: comp.benchmarks,comp.sys.dec Subject: Re: Cache, performance, and data structures used by simulations Date: 2 Mar 1995 23:05:47 GMT Organization: University of Cambridge, England Message-ID: <3j5j0b$b8n@lyra.csx.cam.ac.uk> References: <3j0ljg$in7@agate.berkeley.edu> <3j301q$lue@larry.rice.edu> NNTP-Posting-Host: apus.cus.cam.ac.uk Xref: nntp.gmd.de comp.benchmarks:6074 comp.sys.dec:21928 In article <3j301q$lue@larry.rice.edu>, Vivek Sadananda Pai 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