]> Cypherpunks repositories - gostls13.git/commit
runtime: rewrite addb/subtractb to be simpler to compile; introduce add1, subtract1
authorRuss Cox <rsc@golang.org>
Mon, 11 May 2015 00:22:32 +0000 (20:22 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 14 May 2015 15:55:42 +0000 (15:55 +0000)
commit94934f843ee8b0a4a09dc336d4e2b57601b34206
tree21320edaea278d01208389a3b222d98016147ba3
parent5b3739357aa409548a4c4f9ac7499726c8de9a23
runtime: rewrite addb/subtractb to be simpler to compile; introduce add1, subtract1

This reduces the depth of the inlining at a particular call site.
The inliner introduces many temporary variables, and the compiler can do
a better job with fewer. Being verbose in the bodies of these helper functions
seems like a reasonable tradeoff: the uses are still just as readable, and
they run faster in some important cases.

Change-Id: I5323976ed3704d0acd18fb31176cfbf5ba23a89c
Reviewed-on: https://go-review.googlesource.com/9883
Reviewed-by: Rick Hudson <rlh@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/mbitmap.go