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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,edda2b296e2577cf X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!n32g2000pre.googlegroups.com!not-for-mail From: Anh Vo Newsgroups: comp.lang.ada Subject: Re: GNAT's Protected Objects Date: Mon, 8 Nov 2010 13:38:55 -0800 (PST) Organization: http://groups.google.com Message-ID: <4af1a5f4-7bf3-47ee-af67-db50e589e7a8@n32g2000pre.googlegroups.com> References: NNTP-Posting-Host: 149.32.224.33 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1289252335 26695 127.0.0.1 (8 Nov 2010 21:38:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 8 Nov 2010 21:38:55 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: n32g2000pre.googlegroups.com; posting-host=149.32.224.33; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; MS-RTC LM 8),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:15388 Date: 2010-11-08T13:38:55-08:00 List-Id: On Nov 8, 12:34=A0pm, Jeffrey Carter wrote: > > If I use a Linda-like approach, with a protected procedure doling out (Ro= w, > Column) pairs on demand, a single task is always fastest, and using multi= ple > tasks slows things down. This wasn't what I expected, and wondered if thi= s is > inherent in such an approach, or specific to GNAT's way of implementing > protected objects. > How may tasks used, two or four, when slowness was observed when compared to simple task? I will be supprised if the answer is two. It is logically expected that two tasks should perform better than single task. However, when it comes to four or greater task, the result may not be true due to task switching cost. I would be glad to test it on my two core CPU mahine if the your little program is posted. Anh Vo