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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: How to get Ada to ?cross the chasm?? Date: Tue, 08 May 2018 23:49:10 -0700 Organization: A noiseless patient Spider Message-ID: <87fu31coih.fsf@nightsong.com> References: <1c73f159-eae4-4ae7-a348-03964b007197@googlegroups.com> <87lgd1heva.fsf@nightsong.com> <87zi1gz3kl.fsf@nightsong.com> <878t8x7k1j.fsf@nightsong.com> <87k1sg2qux.fsf@nightsong.com> <87h8njmk4r.fsf@nightsong.com> <87po27fbv9.fsf@nightsong.com> <87h8nhwhef.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="a15f8e13c869a4517dec92123a650d01"; logging-data="28771"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Rf+18nFGLMw0Y0xo7Zgf+" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cancel-Lock: sha1:BDpyS95/9OO/an77P/gzyhs/qJ8= sha1:O5E0D959tGI5fcxBMOzChKleH0Y= Xref: reader02.eternal-september.org comp.lang.ada:52146 Date: 2018-05-08T23:49:10-07:00 List-Id: Niklas Holsti writes: > But the atomic instructions are usually much faster than a kernel lock. They're not as bad as I thought. I remembered timings like 100 cycles, which on a superscalar machine is enough for several hundred instructions. But Agner Fog's optimization guide gives figures like 10 cycles for recent Intel cpus. I'm quite impressed by that and wonder what happens when multiple cpu sockets are involved.