I have some functions involving large matrix multiplication in my code. A sample code is as follows.

```
function foo1()
temp = Array[]
for i = 1:1000
push!(temp, randn(400,400)*randn(400,1000))
end
end
function foo2()
for i = 1:1000
randn(400,400)*randn(400,1000)
end
end
@time foo1()
@time foo2()
```

I find that `foo1()`

takes 17 seconds. Without `push!`

, `foo2()`

takes 11 seconds. Is there any way to improve the speed of `foo1()`

? Thank you.