]> Cypherpunks repositories - gostls13.git/commit
runtime: Remove boundary bit logic.
authorRick Hudson <rlh@golang.org>
Tue, 3 Mar 2015 21:55:14 +0000 (16:55 -0500)
committerRick Hudson <rlh@golang.org>
Wed, 4 Mar 2015 20:55:55 +0000 (20:55 +0000)
commit122384e4893edeccb34c3faa4c1378b3bcb55531
tree33e25665d7d7278ca36ad0963e2c2467a43386bc
parent7be32d038a62c463d6808bee98e31bf51059435a
runtime: Remove boundary bit logic.

This is an experiment to see if removing the boundary bit logic will
lead to fewer cache misses and improved performance. Instead of using
boundary bits we use the span information to get element size and use
some bit whacking to get the boundary without having to touch the
random heap bits which cause cache misses.

Furthermore once the boundary bit is removed we can either use that
bit for a simpler checkmark routine or we can reduce the number of
bits in the GC bitmap to 2 bits per pointer sized work. For example
the 2 bits at the boundary can be used for marking and pointer/scalar
differentiation. Since we don't need the mark bit except at the
boundary nibble of the object other nibbles can use this bit
as a noscan bit to indicate that there are no more pointers in
the object.

Currently the changed included in this CL slows down the garbage
benchmark. With the boundary bits garbage gives 5.78 and without
(this CL) it gives 5.88 which is a 2% slowdown.

Change-Id: Id68f831ad668176f7dc9f7b57b339e4ebb6dc4c2
Reviewed-on: https://go-review.googlesource.com/6665
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/mbitmap.go
src/runtime/mcentral.go
src/runtime/mgcmark.go
src/runtime/mgcsweep.go