comp.lang.ada
 help / color / mirror / Atom feed
From: lutz@iks-jena.de (Lutz Donnerhacke)
Subject: Re: Stack based allocation vs. Dynamic allocation
Date: 2000/05/31
Date: 2000-05-31T00:00:00+00:00	[thread overview]
Message-ID: <slrn8j9pno.mk.lutz@taranis.iks-jena.de> (raw)
In-Reply-To: slrn8j9nsi.ab6.gisle@struts.ii.uib.no

* Gisle S�lensminde wrote:
>The stack program was 3 times faster if you consider user times.
>In my tests the system time used was always at least 11 seconds,
>while the stack program never used more than 0.05 seconds. The 
>system have to work harder when using heap allocation, which makes
>the heap program run in only 1/4th of the time of the stack program.

The heap management causes this performance gap.

>The timing will be different on other platforms, but it would surprise 
>me if heap allocation is faster anywhere. With more realistic 
>memory usage, the heap allocation will probably be even worse. 
>The only exception is probably the JVM target, where nearly everything 
>is on the heap.

There are a lot of 'single-address-space' OS around which do not have these
limitations. There heap allocation might be much faster than stack
allocation, simply because they have nothing to do on heap allocation but
to change the parameters of the stack and often rearrange it otherwise.




  reply	other threads:[~2000-05-31  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-31  0:00 Stack based allocation vs. Dynamic allocation dale
2000-05-31  0:00 ` Aaro Koskinen
2000-05-31  0:00 ` Ray Blaak
2000-05-31  0:00   ` Dale Stanbrough
2000-05-31  0:00     ` Laurent Guerby
2000-06-01  0:00       ` Matthew Woodcraft
2000-06-01  0:00         ` Laurent Guerby
2000-06-05  0:00     ` Robert Dewar
2000-05-31  0:00   ` Gisle S�lensminde
2000-05-31  0:00     ` Lutz Donnerhacke [this message]
2000-05-31  0:00       ` Gisle S�lensminde
2000-05-31  0:00     ` Aaro Koskinen
2000-05-31  0:00 ` Jean-Pierre Rosen
replies disabled

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