Hi Steven,
Thanks for the feedback - yes it was intentional, but I am definitely
planning to extend the notebook with performance enhancements.
I was not yet aware of this distinction between Int and Integer. Thanks for
pointing it out.
Christoph
On Monday, 1 December 2014 15:49:10 UTC, Steven G. Johnson wrote:
>
> I notice that in your finite-element notebook you use:
>
> T = zeros(Integer, 3, 2*N^2)
>
>
> You really want to use Int in cases like this (Int = Int64 on 64-bit
> machines and Int32 on 32-bit machines). Using Integer means that you have
> an array of pointers to generic integer containers, whose type must be
> checked at runtime (e.g. T[i] could be an Int32, Int64, BigInt, etc.).
>
> (You also have very Matlab-like code that allocates zillions of little
> temporary arrays in your inner loops. I assume this is intentional, but it
> is definitely suboptimal performance, possibly by an order of magnitude.)
>