On Wednesday, 24 October 2012 at 17:42:50 UTC, Araq wrote:
And that makes it the "fastest GC ever made"?
No, not that, of course. As I said, I haven't seen proper
benchmarks. But OCaml's GC is notorious for its speed and it
performed very well in all comparisons I saw.
One place where immutability really helps is in a generational
GC: runtime needs to track all the pointers from old
generation to the young generation, if most of the data is
immutable there are not so many such pointers, this makes
collection faster. When all data is immutable there is no such
pointers at all, each object can only have pointers to older
ones.
That's true. But you don't need to know about immmutability at
compile time to get this benefit.
I agree.