|
![](/i/fill.gif) |
On 9/6/2011 13:28, Warp wrote:
> I'm not sure how a compiler would be able to do that in a complex program
> where nodes and containers are being passed around.
I don't know about Haskell, but in some of the other languages (like
Erlang), changes tend to be localized enough that you can do essentially a
full-program analysis. It also helps that nothing can point to a newer
object; that is, the old heap can never refer to the newer heap, because
that would require modifying things that already exist.
That said, I don't really understand the details of how such an analysis is
done myself.
> (Of course the copying is not a big deal if each node contains eg. a
> couple of integers. However, it begins to matter if they contain for example
> large strings, which isn't all that unusual.)
Sure. Or if it's storing a big structure that for whatever reason the
individual fields can't be shared, which would seem not unusual as well.
--
Darren New, San Diego CA, USA (PST)
How come I never get only one kudo?
Post a reply to this message
|
![](/i/fill.gif) |