You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the type T is a direct interface type (a pointer type), we don't need to call into the runtime to convert a value from type T to an interface{}. If T is such a type, then just making an interface value from the type ptr (a constant) and T itself is all that is needed.
For convT2I, we could also do something similar. If the type is a directInterface type and the itab cache is not nil, we can use that itab cache value directly without calling into the runtime. This is less obviously a win because the generated code still needs the call, and the cache read might need an atomic load.
The text was updated successfully, but these errors were encountered:
If the type T is a direct interface type (a pointer type), we don't need to call into the runtime to convert a value from type T to an interface{}. If T is such a type, then just making an interface value from the type ptr (a constant) and T itself is all that is needed.
For convT2I, we could also do something similar. If the type is a directInterface type and the itab cache is not nil, we can use that itab cache value directly without calling into the runtime. This is less obviously a win because the generated code still needs the call, and the cache read might need an atomic load.
The text was updated successfully, but these errors were encountered: