clear; clc;

N = 4e4;

tic
x = [];
for i = 1 : N
    x = [x, i ^ 2];
end
toc

tic
y = 1 : N;
z = y .^ 2;
toc