From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7767a311e01e1cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!attbi_s21.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GNAT compiler switches and optimization References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s21 1161550480 12.201.97.213 (Sun, 22 Oct 2006 20:54:40 GMT) NNTP-Posting-Date: Sun, 22 Oct 2006 20:54:40 GMT Date: Sun, 22 Oct 2006 20:54:40 GMT Xref: g2news2.google.com comp.lang.ada:7144 Date: 2006-10-22T20:54:40+00:00 List-Id: tmoran@acm.org wrote: > Each 800x800 Float matrix is about 2.5 megabytes so I would expect two > threads to be fighting each other over the cache. What are the single vs > dual threaded times for, say, 250x250 arrays and a 1 MB cache on your > machine, and on the dual Xeon machine? > Curiously, on a 3 GHz Pentium 4 with 1 MB cache and compiling > with -O2 -gnatp using the venerable gnat 3.15p, I get > Time: 8.511855190 800 1 thread > Time: 5.682686332 800 2 threads > for a speedup of 33% > Time: 0.092724434 200 1 thread > Time: 0.059209520 200 2 threads > for a speedup of 36% On my 3.2 GHz P4 HT (best of 3 runs), I get Time: 0.170563050 250 1 thread Time: 0.134637140 250 2 threads for a speedup of 24%. Time: 0.113739732 200 1 thread Time: 0.070599932 200 2 threads for a speedup of 36%. I'm still only getting about 10% speedup for 800. Is it possible my cache is smaller? -- Jeff Carter "I unclog my nose towards you." Monty Python & the Holy Grail 11