]> Cypherpunks repositories - gostls13.git/commit
runtime: combine wbuf checks in tryGetFast and putFast
authorJakub Ciolek <jakub@ciolek.dev>
Fri, 18 Mar 2022 08:10:02 +0000 (09:10 +0100)
committerAustin Clements <austin@google.com>
Mon, 21 Mar 2022 22:42:59 +0000 (22:42 +0000)
commit86c8075675ed74c1f404894242c26b99800f1639
tree3c8709139a9c83b38fa6ac7c8cebfb1b9ec13434
parent4b6debaf2894757e7ae9ad31f52f6a1279c94e90
runtime: combine wbuf checks in tryGetFast and putFast

Less text and improves codegen a bit.

compilecmp on ARM64:

runtime
(*gcWork).putFast 160 -> 144  (-10.00%)
(*gcWork).tryGetFast 144 -> 128  (-11.11%)
scanobject 784 -> 752  (-4.08%)
greyobject 800 -> 784  (-2.00%)

AMD64:

runtime
greyobject 765 -> 748  (-2.22%)
(*gcWork).tryGetFast 102 -> 85  (-16.67%)
scanobject 837 -> 820  (-2.03%)
(*gcWork).putFast 102 -> 89  (-12.75%)

Change-Id: I6bb508afe1ba416823775c0bfc08ea9dc21de8a3
Reviewed-on: https://go-review.googlesource.com/c/go/+/393754
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Michael Knyszek <mknyszek@google.com>
src/runtime/mgcwork.go