cmd/compile: cannot elim binary search typeHash on a type switch for a known type #48220
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.
Performance
Milestone
In
cmd/compile/internal/walk/switch.go
, gc rewrites type switch into a binary search for typeHash and some type assertions.The SSA backend can correctly eliminate the type assertions for a known type, but can't eliminate the binary search.
What did you do?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: