comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com (Ted Dennison)
Subject: Re: Making a package safe for use by multiple tasks
Date: 7 Jun 2002 08:00:43 -0700
Date: 2002-06-07T15:00:44+00:00	[thread overview]
Message-ID: <4519e058.0206070700.78d59613@posting.google.com> (raw)
In-Reply-To: adq0le$2np$1@nets3.rz.RWTH-Aachen.DE

"Alexander Boucke" <alexb@lufmech.rwth-aachen.de> wrote in message news:<adq0le$2np$1@nets3.rz.RWTH-Aachen.DE>...
> I am just playing with the idea to use multiple tasks in a programm doing
> linear algebra. The problem lies in my vector-algebra package, that uses
> some global tmp-object to optimize memory use and reuse. To give you the
...
> since I do reference counting on the vectors. The thing with the tmp_vec
> enables me to reuse this vector several times, e.g. in d := a + b + c it is
> not necessary to allocate it new every time, I could just overwrite tmp_vec
> here.

Forgive me for a bit of ignorance, but how exactly is this quicker
than making tmp_vec a local variable inside of "+" (which would be
perfectly task safe)? Also, how are you saving enough speed with
either method to make up for the vector copy that happens at the
return statement? Also, complicated operations like your "a + b + c"
construction may even have to allocate memory from the heap to store
the intermediate results. If you are truly that worried about speed,
shouldn't you be using procedures with "in out" parameters instead of
functions?

-- 
T.E.D. 
Home     -  mailto:dennison@telepath.com (Yahoo: Ted_Dennison)
Homepage -  http://www.telepath.com/dennison/Ted/TED.html



  parent reply	other threads:[~2002-06-07 15:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-07 10:07 Making a package safe for use by multiple tasks Alexander Boucke
2002-06-07 11:11 ` Marc A. Criley
2002-06-07 11:47   ` Alexander Boucke
2002-06-07 13:31 ` Dr. Michael Paus
2002-06-07 13:44   ` Making a package safe for use by multiple tasks (Correction) Dr. Michael Paus
2002-06-07 15:00 ` Ted Dennison [this message]
2002-06-07 16:37 ` Making a package safe for use by multiple tasks Georg Bauhaus
2002-06-07 21:16 ` Jeffrey Carter
2002-06-08 13:14   ` Craig Carey
2002-06-08 13:39     ` Dr. Michael Paus
  -- strict thread matches above, loose matches on Subject: below --
2002-06-07 10:14 Grein, Christoph
2002-06-07 10:29 ` Alexander Boucke
replies disabled

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