Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!hao!gatech!linus!bs From: bs@linus.UUCP (Robert D. Silverman) Newsgroups: comp.arch Subject: Re: RISC is a nasty no-no! Message-ID: <25988@linus.UUCP> Date: 3 Mar 88 15:39:07 GMT References: <179@wsccs.UUCP: <696@nuchat.UUCP: <284@scdpyr.UUCP: <25699@linus.UUCP: <11199@duke.cs.duke.edu> <25723@linus.UUCP> <8332@eddie.MIT.EDU> <7482@apple.UUCP> <7514@boring.cwi.nl> <17415@think.UUCP> Reply-To: bs@gauss.UUCP (Robert D. Silverman) Organization: The MITRE Corporation, Bedford MA Lines: 33 In article <17415@think.UUCP: barmar@fafnir.think.com.UUCP (Barry Margolin) writes: :In article <7514@boring.cwi.nl: dik@cwi.nl (Dik T. Winter) writes: ::In article <7482@apple.UUCP> baum@apple.UUCP (Allen Baum) writes: :: > (power of two array sizes are pretty common!), : :For scientific programming (the major application of supercomputers), :is this really true? What scientific applications naturally map onto :power-of-two arrays? I suspect that making arrays a power of two in :size is a habit mostly of systems programmers, who know to make things :fit neatly into memory pages in order to reduce paging. : ::I agree with most (CDC Cyber does not have a true integer multiply either). ::when you start programming on supers you will soon ::learn that power of two array sizes are the worse choice you can make. : :Could you explain why this is so? Maybe there are architectures where :it doesn't make a difference, but I can't imagine why power of two :would be WORSE than other sizes. : :Barry Margolin :Thinking Machines Corp. : :barmar@think.com :uunet!think!barmar Somewhat simplified explanation: This is relatively easy to explain. When doing vectorization on arrays whose length is a power of two, memory interleaving conflicts occur. You find that instead of grabbing different elements of an array from different banks you try to grab multiple elements from the SAME banks. This defeats the purpose of interleaving and slows down vectorization. Bob Silverman