Performance problems when dealing with deliberately type-unstable code. How to use type knowledge better?

Just for reference, if you can subtype all your structs from a single abstract type, then you can use Macro to write function with many conditionals - #8 by Skoffer to make union splitting irrelevant of the number of types you define.

1 Like