From: aaro@iki.fi (Aaro Koskinen)
Subject: Re: Stack based allocation vs. Dynamic allocation
Date: 2000/05/31
Date: 2000-05-31T07:32:10+00:00 [thread overview]
Message-ID: <pdx3dmzcgzp.fsf@vesuri.Helsinki.FI> (raw)
In-Reply-To: dale-D70BFC.16062031052000@news.rmit.edu.au
dale <dale@cs.rmit.edu.au> writes:
> > time ./heap
> 0.01u 0.02s 0:00.18 16.6%
> > time ./stack
> 17.72u 0.10s 0:19.86 89.7%
>
> Does anyone know what the factors are that would cause stack
> allocation to be so slow?
The array sizes were not equal. In the stack version, the loop is
about 2000 times longer. A harsh calculation would indicate that the
stack allocation was actually quicker.
--
Aaro Koskinen, aaro@iki.fi, http://www.iki.fi/aaro
prev parent 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 ` Ray Blaak
2000-05-31 0:00 ` Gisle S�lensminde
2000-05-31 0:00 ` Aaro Koskinen
2000-05-31 0:00 ` Lutz Donnerhacke
2000-05-31 0:00 ` Gisle S�lensminde
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 ` Jean-Pierre Rosen
2000-05-31 0:00 ` Aaro Koskinen [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox