And Steve Vavasis writes: > Since fast update is not available for 'immutable', we can only > guess how much improvement is possible.
Likely none at all. Decomposing structured types into their components is a common optimization now, and the immutable semantics permit it. "Immutable" is just Julia's word for a value type. You can declare a structured type that acts just like an integer, float, etc. Just as you cannot change 1 to 2, you cannot change an immutable value (which consists of its components). You can change the value associated with a variable, e.g. v += 1. GC and the rest is just a consequence. There is no 2 object implemented to which variables of integer or fixnum types point, so similarly there is no GC-able object to which values of immutable type point. There could be, but that'd would be an implementation choice.