runtime: remove mapaccess2 in favour of mapaccess (or in reverse) #73196
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
Implementation
Issues describing a semantics-preserving change to the Go implementation.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Given that mapaccess returns the zeroval pointer, i don't see a reason to maintain a second mapaccess2 function that also return a boolean. We could instead at the caller site use mapaccess and compute the
ok
boolean based onptr == zeroval
. This way we could eliminate mapaccess2 (1xnormal and 3xfast ones) implementations from the runtime.Given that registers die at every CALL this might be also done in reverse, so remove mapaccess in favour of mapaccess2 (the asm diff is going to show only a additional
MOV 1 BX
) difference, between mapaccess/mapaccess2).Maybe i am missing some details though. Any thoughts?
CC @prattmic
The text was updated successfully, but these errors were encountered: