I'm curious... Do you have any benchmarks of how much this can improve
performance?

On Saturday, August 8, 2015, <[email protected]> wrote:

> I implemented a short macro that unrolls for-loops that have constant
> bounds.  For example
>
> @unroll for i = 1 : 4
>                  a[i] = b[i] + c[i] + (mod(i,2)==0? d[i] : e[i])
>     end
>
> gets unrolled to
>
>      a[1] = b[1] + c[1] + e[1]
>      a[2] = b[2] + c[2] + d[2]
>      a[3] = b[3] + c[3] + e[3]
>      a[4] = b[4] + c[4] + d[4]
>
> See:  https://github.com/StephenVavasis/Unroll.jl
>
>
>

Reply via email to