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 Path: border1.nntp.dca1.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!news.stack.nl!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn_Lundin?= Newsgroups: comp.lang.ada Subject: Re: can someone help me with this code (explanation) Date: Fri, 26 Sep 2014 16:15:51 +0200 Organization: A noiseless patient Spider Message-ID: References: <6e1f86e6-c17a-428e-bb19-460c5ba26c8a@googlegroups.com> <1ec7272d-de7f-43dd-be30-009c437011de@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 26 Sep 2014 14:15:23 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="23e59b4906029a0ce22afc4c4b1f25ee"; logging-data="5544"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/AdjPeyAkEGqcki/8kfYDQ" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.7.0 In-Reply-To: Cancel-Lock: sha1:dkP1uBsEtH94JIFlXHMspTRLYFc= Xref: number.nntp.dca.giganews.com comp.lang.ada:189168 Date: 2014-09-26T16:15:51+02:00 List-Id: On 2014-09-26 14:49, J-P. Rosen wrote: > Le 26/09/2014 13:48, Björn Lundin a écrit : >> Some people in this group likes to optimize code. >> Having a render-vouz between two tasks, I think, >> is more expensive that calling a protected object. > Hmm... Anything related to efficiency should be backed by measurements. http://www.sigada.org/conf/sa98/papers/mueller.pdf I did not read all of it, but the conclusion is that context switches are bad for performance. If a protected object can REPLACE a task, it will show in measurements. (and they did measure) However, it is tested with gnat 3.10, so things might be different now. And I now learned that render-vouz is spelled rendezvous -- Björn