comp.lang.ada
 help / color / mirror / Atom feed
From: "David Taylor" <dtaylor@iquest.com>
Subject: Re: Ada versus Java - Tasking
Date: 1997/01/19
Date: 1997-01-19T00:00:00+00:00	[thread overview]
Message-ID: <dtaylor-1901971434080001@usr1-d16.iquest.com> (raw)
In-Reply-To: 32DFC320.41C67EA6@innocon.com


In article <32DFC320.41C67EA6@innocon.com>, Jeff Carter <carter@innocon.com>
wrote:

>Jonas Nygren wrote:
>> 
>> I have written a small producer-consumer type of program
>> both in Ada and Java. To my astonishment the Java code
>> executes faster than the Ada code.
>> 
>> My test starts 50 producer-consumer pairs that run in
>> parallell. Each pair produces/consumes 1000 messages
>> of 50 bytes. I get the following timing on my P133,
>> 16M, and running Win95:
>> 
>> Ada  (Gnat 3.04a)  : ~30 s
>
>This seems excessive; see below.
>
>> Java (MS SDK-Java) : ~15 s
>> 
>> ...
>>
>> ... the Ada version
>> stopped working already when 63 pairs were started
>> (62 pairs would run).
>
>I too encountered this limitation.
>
>Here's my version:
>
 << Ada source omitted >>

<< timings omitted >>

>These give an average of 18.37 seconds per run. While not as good as 15
>seconds, this is better than 30 seconds.
>These figures are for GNAT 3.04a on a P120, 32MB, Win95. Built using
>   gnatmake -O3 -gnatn prod_cons.adb
>I conclude the 62-pair limitation is not related to amount of memory.
>I would be interested in knowing how Jonas' version differs from mine.
>-- 
>Jeff Carter
>Innovative Concepts, Inc.

As I was reading this post, I wondered how these timings would compare with
a lowly Apple 120MHz 604 running GNAT 3.07 on top of MachTen.  Some numbers
I got using the same gnatmake above were:

home/dave/prod> prod_cons
 4.916670000
/home/dave/prod> prod_cons
 5.000000000
/home/dave/prod> prod_cons
 5.066664000
/home/dave/prod> prod_cons
 4.583350000
/home/dave/prod> prod_cons
 4.699972000
/home/dave/prod> prod_cons
 4.566644000
/home/dave/prod>

Since the processors are comparable, I suspect the most improvement in time
is because of 3.07.  I no longer have 3.05 installed, so I can't check the
timing with it.  Anyway, not too shabby.

Dave






  reply	other threads:[~1997-01-19  0:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-16  0:00 Ada versus Java - Tasking Jonas Nygren
1997-01-16  0:00 ` Brad Balfour
1997-01-25  0:00   ` Robert Dewar
1997-01-16  0:00 ` wiljan
1997-01-17  0:00 ` Steve Doiel
1997-01-17  0:00 ` Jeff Carter
1997-01-19  0:00   ` David Taylor [this message]
1997-01-20  0:00     ` Jim Hopper
1997-01-20  0:00       ` Michael Paus
1997-01-21  0:00         ` Jim Hopper
1997-01-21  0:00           ` Larry Kilgallen
1997-01-21  0:00             ` jim hopper
1997-01-21  0:00     ` Dr. John B. Matthews
1997-01-23  0:00     ` Jeff Carter
1997-01-18  0:00 ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-01-19  0:00   ` Robert A Duff
1997-01-19  0:00 ` Tom Moran
1997-01-19  0:00 ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-01-19  0:00   ` Larry Kilgallen
1997-01-20  0:00 ` Jon S Anthony
1997-01-20  0:00 ` Dale Pontius
1997-01-20  0:00 ` Ada Tasking revisited (was: Re: Ada versus Java - Tasking) Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-01-20  0:00 ` Ada versus Java - Tasking Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-01-21  0:00 ` Ole-Hjalmar Kristensen FOU.TD/DELAB
replies disabled

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