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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,3a6a9f1d654285ba X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!o9g2000yqj.googlegroups.com!not-for-mail From: Martin Newsgroups: comp.lang.ada Subject: Re: Ada Shootout program for K-Nucleotide (patches) Date: Fri, 4 Sep 2009 10:56:59 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <4a743343$0$32674$9b4e6d93@newsspool2.arcor-online.net> <3f9f9e21-e088-4fbe-baac-dd43fdf6b911@r38g2000yqn.googlegroups.com> <4a757b0d$0$31328$9b4e6d93@newsspool4.arcor-online.net> <4a9fc85a$0$2850$ba620e4c@news.skynet.be> <1a5e1270-6a0a-4fff-a9b4-965abe610b69@o9g2000yqj.googlegroups.com> <4a9fdd46$0$2853$ba620e4c@news.skynet.be> <4aa0afbf$0$2864$ba620e4c@news.skynet.be> <3df8815d-b65a-4f73-9015-65375dcff113@x38g2000yqb.googlegroups.com> <4aa0e963$0$2868$ba620e4c@news.skynet.be> <0709cb9b-6144-4b14-a555-97262b1fa7b7@x37g2000yqj.googlegroups.com> NNTP-Posting-Host: 81.158.228.238 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1252087020 19826 127.0.0.1 (4 Sep 2009 17:57:00 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 4 Sep 2009 17:57:00 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o9g2000yqj.googlegroups.com; posting-host=81.158.228.238; posting-account=g4n69woAAACHKbpceNrvOhHWViIbdQ9G User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.0.10, Ant.com Toolbar 1.3,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8162 Date: 2009-09-04T10:56:59-07:00 List-Id: On Sep 4, 1:50=A0pm, Ludovic Brenta wrote: > Olivier Scalbert wrote on comp.lang.ada: > > >http://scalbert.dyndns.org/ada/knucleotide/callgrind_out_14048.txt > > Let's see: > > 43,644,857,598 =A0PROGRAM TOTALS > [...] > > =A0 =A0 =A0 =A0 =A0 =A0 . > -------------------------------------------------------------------------= --- > =A0 =A0 =A0 =A0 =A0 =A0 . =A0 =A0 -- > =A0 =A0 =A0 =A0 =A0 =A0 . =A0 =A0 -- =A0Calculate and write data - either= a percentage > for all fragments found or - when > =A0 =A0 =A0 =A0 =A0 =A0 . =A0 =A0 -- =A0Nucleotide_Fragment is given - th= e count for > that fragment. > =A0 =A0 =A0 =A0 =A0 =A0 . =A0 =A0 -- > =A0 262,499,981 =A0 =A0 procedure Write > 8,251,549,172 =A0=3D> ???:system__secondary_stack__ss_mark (7x) > =A0 =A0 =A0 =A0 =A0 =A0 . =A0 =A0 =A0 (Nucleotide_Length =A0 : in Frequen= cies; > =A0 =A0 =A0 =A0 =A0 =A0 . =A0 =A0 =A0 =A0Nucleotide_Fragment : in Fragmen= t :=3D > Fragments.Null_Bounded_String) > =A0 =A0 =A0 =A0 =A0 =A0 . =A0 =A0 is > > Apparently, passing unconstrained strings to procedure Write involves > allocations on the secondary stack which account for 20% of the entire > execution time. That's hot spot #1. I wonder whether it is feasible to > pass access values to the strings. > > -- > Ludovic Brenta. I'm not familiar with this tool but if 'big numbers' for innocuous looking code is to be checked then what about: . function Get_Key (E : Element_Access) return Fragment is . begin 1,395,255,084 return E.all.Key; Is there some accessibility check going on in this? Could a 'pragma Assert (E.all /=3D null);' help? Cheers -- Martin