[julia-users] Re: What is the best way to element-wise right shift an array?

2016-09-18 Thread K leo
OK, ran a test. And the difference is pretty dramatic. Look: | | |_| | | | (_| | | Version 0.5.0-rc4+0 (2016-09-09 01:43 UTC) _/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release |__/ | x86_64-pc-linux-gnu julia> include("testArray.jl") julia> testShift()

[julia-users] Re: What is the best way to element-wise right shift an array?

2016-09-18 Thread Kristoffer Carlsson
Just because you are calling two functions doesn't mean it is slow. Have you benchmarked? On Sunday, September 18, 2016 at 11:55:47 AM UTC+2, K leo wrote: > > I have been using simply A=[0; A[1:end-1]], but found it to be somehow > quite expensive. I saw that there is unshift! but it has to