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.
user664303
14
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Telling Julia the type of a function's output (and other adventures in type stability) | 5 | 684 | May 31, 2023 | |
| Obtaining a function's output type | 8 | 3063 | June 1, 2018 | |
| Function output parametric type assertion | 2 | 714 | November 29, 2019 | |
| Specifying output container type based on input container | 14 | 630 | March 20, 2023 | |
| Type inference in recursion | 14 | 1899 | January 31, 2017 |