Check out Cartesian's @nexprs macro. Docs are in the package, but the 
functionality is now in Base.

That said, when @simd applies it should be even better.

--Tim

On Thursday, April 10, 2014 07:26:47 AM Mike Innes 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