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: a07f3367d7,7d44f4c1437a0bc1 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!e34g2000vbm.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Mixing Ada and c Date: Sat, 26 Sep 2009 13:46:02 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 83.79.76.94 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1253997962 14773 127.0.0.1 (26 Sep 2009 20:46:02 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 26 Sep 2009 20:46:02 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e34g2000vbm.googlegroups.com; posting-host=83.79.76.94; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S 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.3) Gecko/20090824 Firefox/3.5.3,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8490 Date: 2009-09-26T13:46:02-07:00 List-Id: On 25 Wrz, 18:19, Mike wrote: > I have a c main program which does socket communications and calls and > ada program which generates the data to be sent over the wire. What > I've noticed is that the ada portion of the program runs almost twice > as slow when linked with the c main =A0than when run in stand alone with > an ada driver. Is there a general reason that ada code in general runs > more slowly when linked with and called by a c program? I have no idea whether this is relevant, but you might want to check whether the C thread (the one calling Ada) was registered at the Ada runtime. If not, then some of the operations might be trying to use the information that is not available and then failing over to alternative strategies. Again, I have no idea if this is the case, but I can easily imagine the slowdown caused this way. I am also interested in the actual reasons for what you see. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com Database Access Library for Ada: www.inspirel.com/soci-ada