Performance of filling an array

Looks kind of similar to