Thanks!

On Sunday, October 11, 2015 at 7:45:35 PM UTC+2, Mauro wrote:
>
> > Sorry. I wanted to say AbstractInt not Int. 
>
> `Integer` is the abstract datatype.  Anyway the answer is: no, it does 
> not help.  To make fast code Julia must know the memory layout of a 
> type, which can only be known for a concrete type. 
>
> > Then will this abstract annotation help? 
> > 
> > On Sunday, October 11, 2015 at 6:07:35 PM UTC+2, Kristoffer Carlsson 
> wrote: 
> >> 
> >> Int is a concrete type. On x64 it is Int64 and on x86 it is Int32. 
> >> 
> >> On Sunday, October 11, 2015 at 5:41:11 PM UTC+2, cheng wang wrote: 
> >>> 
> >>> In `performance tips`, there is an example: 
> >>> function foo(a::Array{Any,1}) 
> >>>     x = a[1]::Int32 
> >>>     b = x+1 
> >>>     ... 
> >>> end 
> >>> It say the annotation ::Int32 helps in this case. 
> >>> 
> >>> So I was wondering if it still helps in the following case with 
> abstract 
> >>> type annotation?? 
> >>> function foo(a::Array{Any,1}) 
> >>>     x = a[1]::Int 
> >>>     b = x+1 
> >>>     ... 
> >>> end 
> >>> Here the annotation is ::Int. 
> >>> 
> >>> Thanks! 
> >>> 
> >> 
>

Reply via email to