comp.lang.ada
 help / color / mirror / Atom feed
* GNAT's Protected Objects
@ 2010-11-08 20:34 Jeffrey Carter
  2010-11-08 21:38 ` Anh Vo
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Jeffrey Carter @ 2010-11-08 20:34 UTC (permalink / raw)


I was trying to decide the "optimal" number of tasks for concurrent problems on 
my 2-core system, so I wrote a little program to do matrix multiplication with 
multiple tasks.

When the tasks divide the result matrix among themselves in the obvious way, 
there's a clear decrease in elapsed time as the number of tasks increases to 4.

If I use a Linda-like approach, with a protected procedure doling out (Row, 
Column) pairs on demand, a single task is always fastest, and using multiple 
tasks slows things down. This wasn't what I expected, and wondered if this is 
inherent in such an approach, or specific to GNAT's way of implementing 
protected objects.

-- 
Jeff Carter
"Sir Robin the not-quite-so-brave-as-Sir-Lancelot,
who had nearly fought the Dragon of Angnor,
who nearly stood up to the vicious Chicken of Bristol,
and who had personally wet himself at the
Battle of Badon Hill."
Monty Python & the Holy Grail
68



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-11-24  7:08 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-08 20:34 GNAT's Protected Objects Jeffrey Carter
2010-11-08 21:38 ` Anh Vo
2010-11-08 22:32   ` Jeffrey Carter
2010-11-08 22:43     ` Robert A Duff
2010-11-09  0:27       ` Jeffrey Carter
2010-11-09 14:21         ` Robert A Duff
2010-11-09 18:23           ` Jeffrey Carter
2010-11-09 10:05       ` Egil Høvik
2010-11-09  1:50     ` Anh Vo
2010-11-09  3:14       ` Jeffrey Carter
2010-11-09  2:03     ` Peter C. Chapin
2010-11-09 10:18     ` Egil Høvik
2010-11-09 11:17       ` Julian Leyh
2010-11-09 18:22       ` Jeffrey Carter
     [not found] ` <s5GdnRvDRfR6-0XRnZ2dnUVZ_hOdnZ2d@earthlink.com>
2010-11-08 22:41   ` Jeffrey Carter
2010-11-09 10:36 ` Maciej Sobczak
2010-11-24  7:08 ` Brad Moore

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