Any Swift performance / protocol wizards out there? I have a function implemented in a protocol extension that's called millions of times per second. It spends a lot of time in `__swift_instantiateGenericMetadata`.

I get a big performance bump by moving the implementation into each type that conforms to the protocol. Is there any way to get the compiler to do this itself? Do I need to write a macro to do it for me?