Defunctionalization is nice for higher order functions where it is completely necessary to avoid runtime support, but in some cases it's favourable to use function pointers instead (since they don't generate huge code bloat for certain scenarios, i.e.):
data Foo a = Foo (a -> Int)
Under what conditions is it safe to implement higher order calls using function pointers instead of reducing them to huge switch tables of static calls?
My initial thought is that it has something to do with known arity.