I tried this examples. It only improves if xprime is not allocated over and over. Instead, try fill!(xprime,1.0) for ones(...). Also, colon indexing xprime[:] allocates memory. Instead, you can use reinterpret/reshape. In real code, xprime should not be re-allocated with ones method. You can update it with @inbounds macro in for loops. At least, updating xprime and not using xprime[:] solves wasted allocations issue (by doing these in my trials overall allocated memory was around 1/3 of the original example).
- [julia-users] Julia vs Matlab: interpolation and looping pokerhontas2k8
- [julia-users] Re: Julia vs Matlab: interpolation and ... Andrew
- [julia-users] Re: Julia vs Matlab: interpolation ... Tomas Lycken
- [julia-users] Re: Julia vs Matlab: interpolat... pokerhontas2k8
- [julia-users] Re: Julia vs Matlab: interp... Lutfullah Tomak
- Re: [julia-users] Re: Julia vs Matlab: in... Isaiah Norton
- [julia-users] Re: Julia vs Matlab: interp... Andrew
- [julia-users] Re: Julia vs Matlab: i... pokerhontas2k8
- [julia-users] Re: Julia vs Matla... Lutfullah Tomak
- [julia-users] Re: Julia vs M... Lutfullah Tomak
- [julia-users] Re: Julia vs M... Andre Bieler
- [julia-users] Re: Julia vs M... Lutfullah Tomak
- [julia-users] Re: Julia vs M... pokerhontas2k8
- [julia-users] Re: Julia vs Matlab: interpolation and ... nuffe