4 ms·
> it means that the entire compile time set of problems is also lifted into runtime It's what Swift does if inlining is defeated, the type arguments are passed
by _old_dude_ 5y ago
> it means that the entire compile time set of problems is also lifted into runtime
It's what Swift does if inlining is defeated, the type arguments are passed at runtime as a classical argument on stack.
You don't need full reflection as you suggest, only to be able to materialize the types as structs + an interface at runtime. Yes, it's a little slower but most of the overhead comes from the function not be inlined.