Optimisation: mutable vectors and unboxing