Replacement for GMP: Update

skaller skaller at users.sourceforge.net
Sat Aug 12 04:34:54 EDT 2006


On Sat, 2006-08-12 at 10:58 +0400, Bulat Ziganshin wrote:
> Hello skaller,
> 
> Saturday, August 12, 2006, 7:06:15 AM, you wrote:
> 
> > My point here is that actually this is a disastrous optimisation
> > in a  multi-processing environment, because in general, the
> > assignment of a pointer means the store isn't write once.
> 
> :)  all the variables rewritten is local to the function. _without_
> tail call optimization, we create new stack frame for each recursive
> call. _with_ optimization, we just update vars in the first stack
> frame created because we know that these vars will not be reused after
> return from call

Yes, but this defeats the use of the kind of collector I attempted
to describe. 

The problem will occur if the 'stack' is aged: in that case
the sweep can miss the mutation and reap a live object.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net



More information about the Glasgow-haskell-users mailing list