sumA=0 for i=1:length(A) sumA = sumA + abs(A[i]) end
A is a 1-dimensional array. I used to compute sum(abs(A)). But when I
changed to the following, the speed increased nearly 10 fold. Why is that?
- [julia-users] why sum(abs(A)) is very slow K Leo
- Re: [julia-users] why sum(abs(A)) is very slow John Myles White
- Re: [julia-users] why sum(abs(A)) is very slow Stefan Karpinski
- Re: [julia-users] why sum(abs(A)) is very sl... Rafael Fourquet
- Re: [julia-users] why sum(abs(A)) is ver... Stefan Karpinski
- Re: [julia-users] why sum(abs(A)) i... Rafael Fourquet
- Re: [julia-users] why sum(abs(A... Stefan Karpinski
- Re: [julia-users] why sum(a... gael . mcdon
- Re: [julia-users] why sum(a... Stefan Karpinski
- Re: [julia-users] why sum(a... gael . mcdon
- Re: [julia-users] why sum(a... gael . mcdon