comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian_drummond@btconnect.com>
Subject: Re: Need some light on using Ada or not
Date: Sun, 20 Feb 2011 16:18:27 +0000
Date: 2011-02-20T16:18:27+00:00	[thread overview]
Message-ID: <sre2m6908odkqt8bd49q769fqffli5kktc@4ax.com> (raw)
In-Reply-To: df26dea4-9484-48e6-b38c-6f4f18a75152@o20g2000yqk.googlegroups.com

On Sun, 20 Feb 2011 07:45:33 -0800 (PST), jonathan <johnscpg@googlemail.com>
wrote:

>On Feb 20, 2:34�pm, Brian Drummond <brian_drumm...@btconnect.com>
>wrote:
>
>> I removed virtually the entire body of the program into a single task.
>> This change alone doubles the "CPU" time. There appears to be a 100% penalty
>> associated simply with running the original program from within a second task.
>
>
>I noticed that too.  As soon as I declare a task, (you
>don't have to use it for anything) then run-time doubles.
>
>So as far as I can tell, anything with gnat tasks (p-threads)
>has this behavior. The C program that uses p-threads (C#5)
>has the same behavior.

Thanks for the confirmation. I'll have to do some reading about Annex E, and
PolyOrb...

Meanwhile, slightly better news...

on my 4-core machine (AMD Phenom 955X4) the original single-CPU code runs in 30
seconds, and moving to a single task increases runtime to about 50 seconds.

Using 4 tasks, the CPU time remains about 50 seconds, but the elapsed time is
reduced to 18 seconds ( 9 tasks give 400% CPU usage for 12 seconds, then 100%
for a further 6). Assuming this scales to the reference machine (single-CPU 37
seconds, but Intel rather than AMD) would give a runtime around 23s, and move
Ada up from 16th to 10th place.  

Or if I can employ finer grained tasking to balance the load better... 
well, 16 seconds would give us 6th place, 15s would give 4th place.

- Brian



  reply	other threads:[~2011-02-20 16:18 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-18 22:52 Need some light on using Ada or not Luis P. Mendes
2011-02-18 23:58 ` Georg Bauhaus
2011-02-19 14:25   ` Simon Wright
2011-02-19  0:20 ` Edward Fish
2011-02-20  0:13   ` Luis P. Mendes
2011-02-20  1:36     ` Marc A. Criley
2011-02-20  9:59     ` mockturtle
2011-02-20 10:37     ` Brian Drummond
2011-02-20 11:08     ` Ludovic Brenta
2011-03-01  8:10     ` Adrian Hoe
2011-03-01  8:29       ` Thomas Løcke
2011-03-04 13:34         ` Adrian Hoe
2011-02-19  8:43 ` Vadim Godunko
2011-02-19 13:07 ` Brian Drummond
2011-02-19 14:17   ` Simon Wright
2011-02-19 18:02     ` Brian Drummond
2011-02-19 18:07       ` Bill Findlay
2011-02-20 10:42         ` Brian Drummond
2011-02-19 14:36   ` Georg Bauhaus
2011-02-19 18:25     ` Brian Drummond
2011-02-20 14:34       ` Brian Drummond
2011-02-20 15:45         ` jonathan
2011-02-20 16:18           ` Brian Drummond [this message]
2011-02-20 19:49           ` Pascal Obry
2011-02-20 19:57             ` Brian Drummond
2011-02-20 20:10               ` jonathan
2011-02-20 21:15                 ` Pascal Obry
2011-02-20 21:26                   ` Vinzent Hoefler
2011-02-20 21:33                     ` Vinzent Hoefler
2011-02-20 21:36                     ` Pascal Obry
2011-02-20 21:50                       ` Vinzent Hoefler
2011-02-20 22:18                   ` jonathan
2011-02-20 22:47               ` Simon Wright
2011-02-21 12:52                 ` Brian Drummond
2011-02-21 13:44                   ` Simon Wright
2011-02-24  0:19                     ` Brian Drummond
2011-02-24  7:41                       ` Jacob Sparre Andersen
2011-02-22  2:15                   ` Shark8
2011-02-20 16:42       ` jonathan
2011-02-20 20:02         ` Brian Drummond
2011-02-20  0:20   ` Luis P. Mendes
2011-02-20 10:50     ` Brian Drummond
2011-02-20 19:54     ` Brian Drummond
2011-02-23 22:19       ` Luis P. Mendes
2011-02-24 17:06         ` Brian Drummond
2011-02-27 17:51           ` Luis P. Mendes
replies disabled

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