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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ad4585f2971e47c5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!217.73.144.44.MISMATCH!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 20 Feb 2011 10:15:38 -0600 From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Need some light on using Ada or not Date: Sun, 20 Feb 2011 16:18:27 +0000 Reply-To: brian@shapes.demon.co.uk Message-ID: References: <4d5ef836$0$23753$14726298@news.sunsite.dk> <7ibvl6tn4os3njo3p4kek9kop44nke3n7t@4ax.com> <4d5fd57d$0$6992$9b4e6d93@newsspool4.arcor-online.net> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-OQueJPZaU1u5houwORJn8rMtBzkH36N+ydS62njRTO6CV1faeMxVs4MAz8/Q/F0een2rzQ59lLG8bI+!lgIyCEKWBHdy+LI3fjbqR73sgKU5pMbWkIuS2tCUCRLoT3bS9ymOlIAhRkV5N67YNRil0uy0t1wN!sNc= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2860 Xref: g2news1.google.com comp.lang.ada:17489 Date: 2011-02-20T16:18:27+00:00 List-Id: On Sun, 20 Feb 2011 07:45:33 -0800 (PST), jonathan wrote: >On Feb 20, 2:34�pm, Brian Drummond >wrote: > >> I removed virtually the entire body of the program into a single task. >> This change alone doubles the "CPU" time. There appears to be a 100% penalty >> associated simply with running the original program from within a second task. > > >I noticed that too. As soon as I declare a task, (you >don't have to use it for anything) then run-time doubles. > >So as far as I can tell, anything with gnat tasks (p-threads) >has this behavior. The C program that uses p-threads (C#5) >has the same behavior. Thanks for the confirmation. I'll have to do some reading about Annex E, and PolyOrb... Meanwhile, slightly better news... on my 4-core machine (AMD Phenom 955X4) the original single-CPU code runs in 30 seconds, and moving to a single task increases runtime to about 50 seconds. Using 4 tasks, the CPU time remains about 50 seconds, but the elapsed time is reduced to 18 seconds ( 9 tasks give 400% CPU usage for 12 seconds, then 100% for a further 6). Assuming this scales to the reference machine (single-CPU 37 seconds, but Intel rather than AMD) would give a runtime around 23s, and move Ada up from 16th to 10th place. Or if I can employ finer grained tasking to balance the load better... well, 16 seconds would give us 6th place, 15s would give 4th place. - Brian