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,e0e1d3b3f7c994b8 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!i29g2000prf.googlegroups.com!not-for-mail From: Vadim Godunko Newsgroups: comp.lang.ada Subject: Re: Robert Dewar's great article about the Strengths of Ada over other langauges in multiprocessing! Date: Wed, 12 Mar 2008 08:22:34 -0700 (PDT) Organization: http://groups.google.com Message-ID: <604214ee-fc78-47ae-bf2f-fa7c84971918@i29g2000prf.googlegroups.com> References: <13t4b2kkjem20f3@corp.supernews.com> <89af8399-94fb-42b3-909d-edf3c98d32e5@n75g2000hsh.googlegroups.com> <47D39DC8.20002@obry.net> <114f711c-9cf8-4fdb-8f11-77667afb8719@c33g2000hsd.googlegroups.com> NNTP-Posting-Host: 80.254.112.200 Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1205335354 31320 127.0.0.1 (12 Mar 2008 15:22:34 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 12 Mar 2008 15:22:34 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i29g2000prf.googlegroups.com; posting-host=80.254.112.200; posting-account=niG3UgoAAAD7iQ3takWjEn_gw6D9X3ww User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070601 SeaMonkey/1.1.2,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20318 Date: 2008-03-12T08:22:34-07:00 List-Id: On 12 =CD=C1=D2, 17:41, gp...@axonx.com wrote: > > In C++ destructor can be inlined *always*, unless the object is > > deleted via pointer to base. In other words, objects with automatic or > > static storage duration (local, static and global) objects can have > > inlined destructors - no matter whether it is virtual or not. > > Yes if compiler can make that determination at compile time. If not > it will dispatch via VTab. My point was to compare make all the > conditions equal. After all you may consider generic model for Ada > which eliminate all the dispatch overhead. > QString is not a polymorphic class - it don't have any virtual functions. Its constructor, copy constructor, destructor ar inlined. Its assignment operator not inlined. Ada program use tagged but not class-wide type, thus compiler never dispatch any call. I compile all Ada modules with -gnatn (frontend inline enabled). Both program are comparable from this point of view. :-) PS. I have replaced protected type by i386 specific atomic increment/ decrement and have only 1.2 overhead. ;-)