I think Stefan was merely saying that my illustration of how to inline away the type-check was overkill :).
--Tim On Wednesday, April 30, 2014 08:37:15 AM Oliver Woodford wrote: > On Wednesday, April 30, 2014 4:01:22 PM UTC+1, Stefan Karpinski wrote: > > I really think the only code that should be too worried about whether > > something is a leaf type or not is the compiler... > > Are you saying: > a) we should use another way to distinguish between homogeneous and > heterogeneous input arrays, > or > b) that only the compiler should care whether input arrays are homogeneous > and heterogeneous input arrays. > > If b) then: > 1) doesn't it make a big difference to the speed of some functions, e.g. > sum()? > and > 2) if so, is it unreasonable to encourage the user to use homogeneous > arrays in those situations?
