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
typertypestruct {
sizeuintptr// size in byteshashuint32// hash of type; avoids computation in hash tables_uint8// unused/paddingalignuint8// alignment of variable with this typefieldAlignuint8// alignment of struct field with this typekinduint8// enumeration for Calg*uintptr// algorithm table (../runtime/runtime.h:/Alg)gc unsafe.Pointer// garbage collection datastring*string// string form; unnecessary but undeniably useful*uncommonType// (relatively) uncommon fieldsptrToThis*rtype// type for pointer to this type, if used in binary or has methods
}
typeemptyInterfacestruct {
typ*rtypewordiword
}
funcTypeOf(iinterface{}) Type {
eface:=*(*emptyInterface)(unsafe.Pointer(&i))
returntoType(eface.typ)
}
Why not use this code for injector, and rtype.hash used as map keys?
uint32 used as map keys is faster more than reflect.Type.
The text was updated successfully, but these errors were encountered:
my english is not good enough.
in package reflect
Why not use this code for injector, and rtype.hash used as map keys?
uint32 used as map keys is faster more than reflect.Type.
The text was updated successfully, but these errors were encountered: