[MLton-user] Destructive update
Joe Hurd
joe.hurd@comlab.ox.ac.uk
Thu, 9 Feb 2006 16:11:04 +0000
Hi Stephen,
thank you very much for your suggestion and code to test whether data
structures are being used in a single threaded way: I plan to deploy
it straight away in the hot point of my code.
Following the discussion of mutable vs immutable data structures, I'm
still a little unsure whether they should be comparison based or hash
function based. Using comparisons avoids the pathological cases of
colliding hashes and allows a simpler implementation of immutable data
structures (especially in-order traversal), but using hash functions
seems like it might be more efficient and allows a simpler
implementation of mutable data structures. Hmm.
FYI I am running my programs on a 4Gb machine, so 40% corresponds to
1.6Gb, which is how much memory is consumed by the program with
ram-slop set to 80%. Naturally I thought I'd messed up setting the
parameter, but perhaps as you suggest I'm just seeing one semispace,
and I just wasn't looking during GC.
Regards,
Joe