The compiler does aggressive copy propagation (and the calling convention passes pointers to stack slots). Additionally, the compiler can in general take better advantage of immutable data. I’d always prefer an immutable where it makes semantic sense.
7 Likes