From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,7f84976ed48a7472 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2001-06-15 15:22:16 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!news.compaq.com!news.cpqcorp.net!not-for-mail Newsgroups: comp.sys.dec Distribution: world X-Newsreader: mxrn 6.18-32B References: <3B2A74B6.5F18718A@physics.odu.edu> From: hoffman@xdelta.zko.dec.nospam (Hoff Hoffman) Reply-To: hoffman@xdelta.zko.dec.nospam Subject: Re: Optimal use of the L2 cache Message-ID: Date: Fri, 15 Jun 2001 22:22:15 GMT NNTP-Posting-Host: 16.32.80.251 X-Complaints-To: abuse@Compaq.com X-Trace: news.cpqcorp.net 992643735 16.32.80.251 (Fri, 15 Jun 2001 15:22:15 PDT) NNTP-Posting-Date: Fri, 15 Jun 2001 15:22:15 PDT Organization: Compaq Computer Corporation Xref: archiver1.google.com comp.sys.dec:4505 In article <3B2A74B6.5F18718A@physics.odu.edu>, Tobias Oed writes: Operating system, version, and platform? Compiler and version? Compiler command(s) used? Example of the code involved? :I have a piece of code that does a large amount of :floating point computations. In order to get it to :run faster, I build a lookup table of ~4000 floating :point values... You will want the floating point values naturally aligned. :I access the elements of the table in a more or less random fashion :and am affraid that I get a terrible cache performance. Yes, you could be thrashing the cache. Other considerations include the floating point format and the data alignment... :If I am not mistaken, my EV67 has 64k of L2 data cache... Which system do you have? :How could I convince the processor to keep my arrays in that cache. I'd normally expect it to happen, unless something else is tossing the pages out of cache -- eg: a lack of locality, excessive paging. :Would adding dummy values in the middle of the array help? That would not be my first choice. :How big should the chunks of used values be and :how many dummy ones should I insert between them? You say you access the data randomly, and your comments imply some sort of hashing... ---------------------------- #include ----------------------------- For additional, please see the OpenVMS FAQ -- www.openvms.compaq.com --------------------------- pure personal opinion --------------------------- Hoff (Stephen) Hoffman OpenVMS Engineering hoffman#xdelta.zko.dec.com