cmd/compile: optimize reflect.TypeOf(x)==reflect.TypeOf(y) #70738
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
I notice that the code generated for a comparison of rtypes is surprisingly poor, involving a ton of spills and a call to an intrinsic:
Is there any reason it couldn't be recognized as a special case and compiled as if written using unsafe Go code like this:
which boils down to a pair of loads and a comparison:
The text was updated successfully, but these errors were encountered: