]> Cypherpunks repositories - gostls13.git/commit
runtime: simplify b.tophash[i] calculation
authorJosh Bleecher Snyder <josharian@gmail.com>
Mon, 5 Jun 2017 14:18:09 +0000 (07:18 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Tue, 8 Aug 2017 19:51:48 +0000 (19:51 +0000)
commit64bd2c49b4afb80c6f062f52eb3c748970771acf
tree1bf846894af0f7a35661bcce58ecfd7b163b3d81
parentdabc361847f1daa8dee430fc6cf29c52e6f644cc
runtime: simplify b.tophash[i] calculation

The compiler is now smart enough not to insert a bounds check.
Not only is this simpler, it eliminates a LEAQ from the
generated code.

Change-Id: Ie90cbd11584542edd99edd5456d9b02c406e8063
Reviewed-on: https://go-review.googlesource.com/53892
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/hashmap_fast.go