comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: GNAT's Protected Objects
Date: Mon, 08 Nov 2010 13:34:39 -0700
Date: 2010-11-08T13:34:39-07:00	[thread overview]
Message-ID: <ib9mv1$23q$1@tornado.tornevall.net> (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



             reply	other threads:[~2010-11-08 20:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-08 20:34 Jeffrey Carter [this message]
2010-11-08 21:38 ` GNAT's Protected Objects 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
replies disabled

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