Mapslices can’t be inferred, because Julia has no way of telling what prod applied to a slice mat looks like without trying. Therefore mapslices first figures that out by calling prod on the first slice and then it calls an inner function which then is “typestable”. [source]
See keyword “function barrier” in the [performance tips]. Therefore you do not need to worry much about that warning, are you calling mapslices in highly performance relevant code or inner loops?
yes, using in performance sensitive inner loop… so, even with the function barrier inner_mapslices!(), seems like mapslices() is still very slow compared to map( , eachcol() ) as suggested by @mcabbott: