Re: [julia-users] Reductions sometimes not typestable?

2016-10-15 Thread Yichao Yu
On Sat, Oct 15, 2016 at 6:21 PM, jw3126 wrote: > > > On Sunday, October 16, 2016 at 12:12:14 AM UTC+2, Yichao Yu wrote: >> >> >> >> 2016-10-15 18:06 GMT-04:00 jw3126 : >> >>> myop(::Int16, ::Int16) = Int32(1) >>> myop(::Int16, ::Int32) = Int64(1) >>>

Re: [julia-users] Reductions sometimes not typestable?

2016-10-15 Thread jw3126
On Sunday, October 16, 2016 at 12:12:14 AM UTC+2, Yichao Yu wrote: > > > > 2016-10-15 18:06 GMT-04:00 jw3126 : > >> myop(::Int16, ::Int16) = Int32(1) >> myop(::Int16, ::Int32) = Int64(1) >> myop(::Int16, ::Int64) = Int128(1) >> myop(::Int16, ::Int128) = Int128(1) >> >>

Re: [julia-users] Reductions sometimes not typestable?

2016-10-15 Thread Yichao Yu
2016-10-15 18:06 GMT-04:00 jw3126 : > myop(::Int16, ::Int16) = Int32(1) > myop(::Int16, ::Int32) = Int64(1) > myop(::Int16, ::Int64) = Int128(1) > myop(::Int16, ::Int128) = Int128(1) > > foldr(myop, Int16[1]) |> typeof |> println > foldr(myop, Int16[1,1]) |> typeof |> println >

[julia-users] Reductions sometimes not typestable?

2016-10-15 Thread jw3126
myop(::Int16, ::Int16) = Int32(1) myop(::Int16, ::Int32) = Int64(1) myop(::Int16, ::Int64) = Int128(1) myop(::Int16, ::Int128) = Int128(1) foldr(myop, Int16[1]) |> typeof |> println foldr(myop, Int16[1,1]) |> typeof |> println foldr(myop, Int16[1,1,1]) |> typeof |> println foldr(myop,