]> Cypherpunks repositories - gostls13.git/commit
runtime: simplify hashmap tooManyOverflowBuckets
authorJosh Bleecher Snyder <josharian@gmail.com>
Thu, 10 Aug 2017 15:11:46 +0000 (08:11 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 14 Aug 2017 00:51:48 +0000 (00:51 +0000)
commitf5804ce4f3b0f9fa8b9d149edc7fd43c6134768c
tree0e3ca8286e0ae04b82073de509e42803148d8849
parentaca92f352d6a5bc0b17cd39d3b1bbe23ae0bb5ac
runtime: simplify hashmap tooManyOverflowBuckets

This generates better code.

Masking B in the return statement should be unnecessary,
but the compiler is understandably not yet clever enough to see that.

Someday, it'd also be nice for the compiler to generate
a CMOV for the saturation if statement.

Change-Id: Ie1c157b21f5212610da1f3c7823a93816b3b61b9
Reviewed-on: https://go-review.googlesource.com/54656
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Martin Möhrmann <moehrmann@google.com>
src/runtime/hashmap.go