]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.14] runtime: special case interface hashing for pointers
authorKeith Randall <khr@golang.org>
Thu, 13 Feb 2020 16:34:41 +0000 (08:34 -0800)
committerAlexander Rakoczy <alex@golang.org>
Tue, 10 Mar 2020 20:05:44 +0000 (20:05 +0000)
commit6717d27be2c1a67b1d7e8c7d426594c49a818b90
treee4acef155df735d510068b33a5fb8530f312df0c
parent9c41c1d8dcb76d161ce0c633f325abe59f667d48
[release-branch.go1.14] runtime: special case interface hashing for pointers

Interfaces often contain pointers. Implement a fast path for this case.

name                   old time/op  new time/op  delta
MapInterfaceString-16  21.4ns ±19%  20.5ns ±10%     ~     (p=0.361 n=10+10)
MapInterfacePtr-16     25.8ns ± 8%  17.3ns ± 7%  -33.11%  (p=0.000 n=10+9)

We need this CL as well to fix 37721.
Update #37721
Fixes #37613

Change-Id: Ice52820e6259a3edeafcbbbeb25b1e363bef00d0
Reviewed-on: https://go-review.googlesource.com/c/go/+/219338
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
(cherry picked from commit afd691c579198387c874512ef1c75db651dba9bd)
Reviewed-on: https://go-review.googlesource.com/c/go/+/222779
Run-TryBot: Alexander Rakoczy <alex@golang.org>
src/runtime/alg.go