[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: My vectorized code is slower than a loop

From: Dave Cottingham 2
Subject: Re: My vectorized code is slower than a loop
Date: Wed, 19 Oct 2016 07:26:20 -0700 (PDT)

Andreas Weber-6 wrote
> Your script can be simplified to
> w = x-x(end:-1:1);
> try it out!
> Since "if(left(i) <= right(i))" is always true. Perhaps you can provide
> a realistic example?
> -- Andy
> _______________________________________________
> Help-octave mailing list

> Help-octave@


I try to keep the examples short -- and the computation of a realistic
example is a bit involved -- so rather than post the code to compute the
example, here's an octave saveset with a realistic example, and a modified
"looptest.m" that reads it and runs the timing comparison.

Dave Cottingham

looptest.m <>  

View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]