This is a type instability. The compiler doesn’t know the type of bar.foo at compile time, so it has store it in a heap-allocated “box” with a type tag that is inspected at runtime.
4 Likes
This is a type instability. The compiler doesn’t know the type of bar.foo at compile time, so it has store it in a heap-allocated “box” with a type tag that is inspected at runtime.