runtime: avoid extra tophash check in mapassign when key comparison is cheap
runtime: avoid extra tophash check in mapassign when key comparison is cheap

mapaccess and mapdelete functions are already optimized to prefer direct
key comparison instead of tophash checks when key comparison is cheap.

Extended version of golang.org/cl/55235.

AMD64:
name                old time/op    new time/op    delta
MapPopulate/1         42.5ns ± 2%    40.3ns ± 2%  -5.37%  (p=0.000 n=9+10)
MapPopulate/10         558ns ± 1%     556ns ± 1%    ~     (p=0.157 n=10+10)
MapPopulate/100       7.75µs ± 1%    7.66µs ± 2%  -1.19%  (p=0.001 n=10+10)
MapPopulate/1000      92.6µs ± 1%    92.0µs ± 1%  -0.61%  (p=0.016 n=10+8)
MapPopulate/10000      817µs ± 1%     814µs ± 1%    ~     (p=0.247 n=10+10)
MapPopulate/100000    8.02ms ± 1%    7.90ms ± 2%  -1.47%  (p=0.007 n=10+10)

Change-Id: If0eca9931379cbbd37eb753e9bcd2888d8272153
Reviewed-on: https://go-review.googlesource.com/62050
Run-TryBot: Martin Möhrmann <9c82b83f348009b39856043bb9ed3ef41e171aeb@google.com>
Reviewed-by: Daniel Martí <29bf28b42a938ace12a5819da4ed4ba03d82f315@mvdan.cc>
Reviewed-by: Keith Randall <8c99c3a9284e493be632950b84cd789d08ed3e9d@golang.org>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

cloudflare/go,CAFxX/go,josharian/go,Cofyc/go,cloudflare/go,josharian/go,akutz/go,golang/go,golang/go,polyverse-security/go,codestation/go,nawawi/go,polyverse-security/go,cloudflare/go,polyverse-security/go,nawawi/go,golang/go,akutz/go,josharian/go,CAFxX/go,Cofyc/go,polyverse-security/go,polyverse-security/go,nawawi/go,josharian/go,Cofyc/go,codestation/go,josharian/go,cloudflare/go,golang/go,codestation/go,nawawi/go,Cofyc/go,akutz/go,CAFxX/go,akutz/go,codestation/go,akutz/go,josharian/go,nawawi/go,CAFxX/go,josharian/go,cloudflare/go,christopher-henderson/Go,polyverse-security/go,golang/go,CAFxX/go,polyverse-security/go,CAFxX/go,golang/go,nawawi/go,cloudflare/go,CAFxX/go,polyverse-security/go,Cofyc/go,cloudflare/go,cloudflare/go,Cofyc/go,josharian/go,akutz/go,codestation/go,codestation/go,codestation/go,golang/go,nawawi/go,Cofyc/go,codestation/go,Cofyc/go,CAFxX/go,golang/go,akutz/go,akutz/go,nawawi/go