This doesn’t look like an optimization to me; I expect the performance is nearly identical. And the benchmark you linked to applies to an earlier change (to preallocate the array rather than use push), not to the change you are making.