#petermolnarin case of PHP, if I remember correctly, most copies are deep copies, therefore every time you create an extra element you'll create a copy, unless you just use the reference and work on the original array. That said, 600MB is not that bad