comp.lang.ada
 help / color / mirror / Atom feed
* Ada versus Java - Tasking
@ 1997-01-16  0:00 Jonas Nygren
  1997-01-16  0:00 ` wiljan
                   ` (11 more replies)
  0 siblings, 12 replies; 24+ messages in thread
From: Jonas Nygren @ 1997-01-16  0:00 UTC (permalink / raw)




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
Java (MS SDK-Java) : ~15 s

This result was very much to my surprise!

I have tried to check over and over and I can not find
any errors in my code. Furthermore, with Java I managed
to start 400 producer-consumer pairs but the Ada version
stopped working already when 63 pairs were started
(62 pairs would run).

What is a reasonable explanation to this result. Both
Gnat and Java run on top of Win95's threads so there must
be something else that differs. It might be that Gnat 3.04a
is a bit dated and that the implementation in Win95 isn't
so good. It could also be that Ada tasking is inherently
'heavier' than Java's and that this accounts for the
differences.

I would be interested to understand this better if you have
any idea what is happening here. 

/jonas




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

end of thread, other threads:[~1997-01-25  0:00 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-01-16  0:00 Ada versus Java - Tasking Jonas Nygren
1997-01-16  0:00 ` wiljan
1997-01-16  0:00 ` Brad Balfour
1997-01-25  0:00   ` Robert Dewar
1997-01-17  0:00 ` Steve Doiel
1997-01-17  0:00 ` Jeff Carter
1997-01-19  0:00   ` David Taylor
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 ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-01-19  0:00   ` Larry Kilgallen
1997-01-19  0:00 ` Tom Moran
1997-01-20  0:00 ` Ole-Hjalmar Kristensen FOU.TD/DELAB
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-21  0:00 ` Ada versus Java - Tasking Ole-Hjalmar Kristensen FOU.TD/DELAB

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