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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,edda2b296e2577cf,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!newsfeed.straub-nv.de!weretis.net!feeder4.news.weretis.net!news.tornevall.net!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: GNAT's Protected Objects Date: Mon, 08 Nov 2010 13:34:39 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: NNTP-Posting-Host: 231524a3a50c2fe5fd3dd514848fd5d7 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: e3341381677878168b925a681fac727d X-Complaints-To: abuse@tornevall.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10 X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! X-UserIDNumber: 1738 X-Validate-Post: http://news.tornevall.net/validate.php?trace=e3341381677878168b925a681fac727d X-Complaints-Italiano: Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie X-Posting-User: 0243687135df8c4b260dd4a9a93c79bd Xref: g2news2.google.com comp.lang.ada:16357 Date: 2010-11-08T13:34:39-07:00 List-Id: I was trying to decide the "optimal" number of tasks for concurrent problems on my 2-core system, so I wrote a little program to do matrix multiplication with multiple tasks. When the tasks divide the result matrix among themselves in the obvious way, there's a clear decrease in elapsed time as the number of tasks increases to 4. If I use a Linda-like approach, with a protected procedure doling out (Row, Column) pairs on demand, a single task is always fastest, and using multiple tasks slows things down. This wasn't what I expected, and wondered if this is inherent in such an approach, or specific to GNAT's way of implementing protected objects. -- Jeff Carter "Sir Robin the not-quite-so-brave-as-Sir-Lancelot, who had nearly fought the Dragon of Angnor, who nearly stood up to the vicious Chicken of Bristol, and who had personally wet himself at the Battle of Badon Hill." Monty Python & the Holy Grail 68