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: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!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 17:31:45 +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 15:31:02 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="23e59b4906029a0ce22afc4c4b1f25ee"; logging-data="8662"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hNsS4tLeR+WUMGchWKjtv" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.7.0 In-Reply-To: Cancel-Lock: sha1:S7i/SON5TShh+QK5C5Idol3GFOw= Xref: number.nntp.dca.giganews.com comp.lang.ada:189171 Date: 2014-09-26T17:31:45+02:00 List-Id: On 2014-09-26 16:49, J-P. Rosen wrote: > Le 26/09/2014 16:15, Björn Lundin a écrit : >> 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) > > That's a paper from 16 years ago. Computers as well as compilers have > evolved a lot, therefore I would not trust the paper for making a > decision nowadays... > Yes, I did point that out. But still, I have no problem believing that context switches still is bad for performance. In the OP's example, I do not think it matters, but there may be other situations where it does. It's funny though that you want measurements, and when you get them, you say they are too old. -- Björn