comp.lang.ada
 help / color / mirror / Atom feed
From: Jon Harrop <usenet@jdh30.plus.com>
Subject: Re: Heap vs Stack allocation
Date: Wed, 12 Oct 2005 02:38:16 +0100
Date: 2005-10-12T02:38:16+01:00	[thread overview]
Message-ID: <434c69f0$0$73598$ed2619ec@ptn-nntp-reader03.plus.net> (raw)
In-Reply-To: 434c2709$0$21298$626a54ce@news.free.fr

Lionel Draghi wrote:
> The paper "Java theory and practice: Urban performance legends,
> revisited - Allocation is faster than you think, and getting faster"
>
(http://www-128.ibm.com/developerworks/java/library/j-jtp09275.html?ca=dgr-lnxw07JavaUrbanLegends)
> explains (as far as I understand) how JVMs optimize "on-the-fly" memory
> allocation to use stack instead of heap, by using "Escape Analysis".
> 
> My feeling is that those writing JVMs are working hard to guess the data
> lifetime and optimize memory allocation accordingly, because the
> language is unable to express this data locality.
> I think that Ada semantics open much more opportunity to use the stack
> (or registers).

Note that OCaml allocates primarily on the heap and not the stack and is
much faster than Java.

-- 
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com



  parent reply	other threads:[~2005-10-12  1:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-11 20:56 Heap vs Stack allocation Lionel Draghi
2005-10-11 21:47 ` Randy Brukardt
2005-10-12  5:44   ` Jeffrey R. Carter
2005-10-13 23:44     ` Freejack
2005-10-13  2:47       ` Steve
2005-10-13  5:30       ` Jeffrey R. Carter
2005-10-12  1:38 ` Jon Harrop [this message]
2005-10-12 12:35 ` Florian Weimer
replies disabled

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