@Steven, we are not talking about the same thing. You are talking about
vectorizing the code, while I am talking about vectorizing the function.


On Fri, May 8, 2015 at 8:23 PM, Steven G. Johnson <[email protected]>
wrote:

>
>
> On Friday, May 8, 2015 at 12:30:57 PM UTC-4, Sisyphuss wrote:
>>
>> The following code is aimed to study the benefit of vectorization:
>>
>
> (Don't assume that vectorization is beneficial.  In general, vectorizing
> your code in Julia leads to slower code, not faster code.   e.g. compare x
> = y + z + 3y + 4z^2, where y and z are vectors, to writing out the loops.
> Vectorizing is much faster in languages like Python mainly because the
> loops are slow.)
>

Reply via email to