It's not able to vectorize the loop, at least on my computer when I tested 
it.

On Thursday, April 10, 2014 10:44:44 AM UTC-4, Mike Innes wrote:
>
> Ah, nice
> On 10 Apr 2014 15:39, "Isaiah Norton" <isaiah...@gmail.com <javascript:>> 
> wrote:
>
>> See @simd: https://github.com/JuliaLang/julia/pull/5355
>>
>>
>> On Thu, Apr 10, 2014 at 10:26 AM, Mike Innes 
>> <mike.j...@gmail.com<javascript:>
>> > wrote:
>>
>>> To be fair, the simplest implementation being the fastest isn't 
>>> *necessarily* to Julia's credit, since it may also mean that Julia can 
>>> only optimise the simplest code. Not saying that's the case here, but it's 
>>> worth looking at it from that angle.
>>>
>>> Chris' point gives me an idea for an @unroll macro – it could unroll a 
>>> generic for loop to do n at a time, or even take the loop out entirely 
>>> when the iterator is a compile-time constant.
>>>
>>
>> 

Reply via email to