function foo(n)
m = 0.0
for i=1:n
r= rand()-.05
m=max(m,abs(r))
end
return m
end
@time foo(1000000)
elapsed time: 0.005688064 seconds (96 bytes allocated)[julia-users] Re: Julia allocates huge amounts of memory in for loops which should overwrite scalars
- [julia-users] Julia allocates huge amounts of memory in ... Michael Wojnowicz
- [julia-users] Re: Julia allocates huge amounts of m... Jake Bolewski
- [julia-users] Re: Julia allocates huge amounts ... Michael Wojnowicz
- [julia-users] Re: Julia allocates huge amou... Jake Bolewski
- [julia-users] Re: Julia allocates huge amou... Michael Wojnowicz
- [julia-users] Re: Julia allocates huge ... Jake Bolewski
- [julia-users] Re: Julia allocates ... Michael Wojnowicz
- [julia-users] Re: Julia allocates huge ... Steven G. Johnson
