On Tue, Oct 21, 2014 at 6:09 PM, David van Leeuwen <
david.vanleeu...@gmail.com> wrote:

>
> I also noticed that it helped me to write out some broadcast() statements,
> again both in speed and memory allocation---this is of course along the
> philosophy of Julia.
>

To be clear, it is not our philosophy that it is better to always write out
for loops instead of writing vectorized code – you should be allowed to use
whatever is clearer and more convenient. That said, it remains hard for the
compiler to turn some vectorized code into something as efficient as you
can write by writing loops yourself and doing manual loop fusion and
in-place array mutation. We would like to close that gap in time.


> However, I really needed to assert the type in all involved arrays before
> using them in the for-loops, or I would loose a factor 10 or thereabouts in
> speed.
>

This should only be necessary if you're getting these arrays from
non-constant globals or from the fields of a composite type that has
abstractly typed fields.

Reply via email to