Efficiency of abstract types vs `Any`

Here’s 2 comments showing abstract element types allowing type inference to be improved by inferring a (inexplicably high) number of dispatched methods. Any[...] wasn’t demonstrated there but it would’ve been more vulnerable to poor type inference than Val[...] the same way Val[...] was more vulnerable than (Val{T} where T<:SomeTypeUnion)[...].

Performance discrepancy for different ways of piping/composing functions for handling runtime dispatch - General Usage / Performance - Julia Programming Language