On Tuesday, April 28, 2015 at 11:17:55 AM UTC-5, Ronan Chagas wrote:
>
> Sorry, my mistake. Every problem is gone when I change
>
> nf::Integer
>
> to
>
> nf::Int64
>
> in type MGEOStructure.
>
> I didn't know that such thing would affect the performance this much...
>
> Sorry about that,
> Ronan
>

No problem. For future reference (or others coming to this thread in the 
future): 
http://julia.readthedocs.org/en/latest/manual/performance-tips/#avoid-containers-with-abstract-type-parameters

It is somewhat confusing that Integer is an abstract type. If you're not 
sure, you can check with the `isleaftype()` method.

help?> isleaftype
search: isleaftype

Base.isleaftype(T)

   Determine whether "T" is a concrete type that can have instances,
   meaning its only subtypes are itself and "None" (but "T" itself
   is not "None").

julia> isleaftype(Integer)
false

julia> isleaftype(Int)
true

Reply via email to