Output type from input function handle output type?

Thanks. I think in the situation I’m trying to improve, I’m not using dynamic dispatch. Rather, there is some type instability that is causing allocations. I’m not entirely sure. But as I say, thinking about it more, I doubt I’ll be able to do better (in terms of simplicity) than the solution proposed here.

2 Likes