Sweetness. Thank you. AbstractArray it is for me!

On Wednesday, 21 October 2015 16:29:28 UTC-7, Tim Holy wrote:
>
> On Wednesday, October 21, 2015 03:32:04 PM Gabriel Gellner wrote: 
> > * I can't use LinSpace in matrix mult A * b::LinSpace, is this simply a 
> > Bug/Missing Feature? 
>
> Yes 
>
> > * LinSpace objects seem much slower when used in things like element 
> > multiplication A .* b::LinSpace is much much Slower than A .* b::Array, 
> is 
> > this to be expected (the cost of the extra abstraction lack of required 
> > denseness) or simply a side effect of lack of optimization? 
>
> It's because we can't yet eliminate bounds-checks with @inbounds on 
> anything 
> except Arrays. 
>
> > * In general if I make my code accept AbstractArray{Float64} in general 
> > should I expect a performance penalty when calling the function with 
> > Array{Float64} parameters? 
>
> None whatsoever. The only place that's a bad idea is in declarations of 
> type- 
> fields, see 
> http://docs.julialang.org/en/latest/manual/performance-tips/#avoid-fields-with-abstract-type.
>  
>
>
> --Tim 
>
>

Reply via email to