comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: Mixing Ada and c
Date: Sat, 26 Sep 2009 13:46:02 -0700 (PDT)
Date: 2009-09-26T13:46:02-07:00	[thread overview]
Message-ID: <b24a0a8e-d395-43e9-97f4-3daba62c865b@e34g2000vbm.googlegroups.com> (raw)
In-Reply-To: dc9d95f9-66a1-440e-9527-889688792b61@o13g2000vbl.googlegroups.com

On 25 Wrz, 18:19, Mike <michael_ta...@yahoo.com> 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  than 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



  reply	other threads:[~2009-09-26 20:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-25 16:19 Mixing Ada and c Mike
2009-09-26 20:46 ` Maciej Sobczak [this message]
2009-09-30  2:00   ` Greg Bek
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox