3 ms·
> IIRC the Go compiler will generate the itables that it can determine are needed at compile time, but because you can dynamically request an interface conforma
by pcwalton 11y ago
> IIRC the Go compiler will generate the itables that it can determine are needed at compile time, but because you can dynamically request an interface conformance for a type there is also a runtime fallback.
That would make more sense. But http://research.swtch.com/interfaces http://research.swtch.com/interfaces claims it's all runtime-based (though that document may well be out of date).
- cwzwarich 11y agoIt looks like the optimization I remember was implemented in gccgo, but maybe they never added it to the main compiler: http://www.airs.com/blog/archives/277 http://www.airs.com/blog/archives/277