diff options
author | Josh Bleecher Snyder <josharian@gmail.com> | 2018-04-01 11:01:36 -0700 |
---|---|---|
committer | Josh Bleecher Snyder <josharian@gmail.com> | 2018-04-29 05:24:44 +0000 |
commit | 5af0b28a7308ed40af8e315b2a50ac6401bb24c9 (patch) | |
tree | 1f2b11fd6f56663636d16a96cf0692f54641d9a7 /test/prove.go | |
parent | 13cd0061390af0621516ec22b1a3987712b4da3b (diff) | |
download | go-git-5af0b28a7308ed40af8e315b2a50ac6401bb24c9.tar.gz |
runtime: iterate over set bits in adjustpointers
There are several things combined in this change.
First, eliminate the gobitvector type in favor
of adding a ptrbit method to bitvector.
In non-performance-critical code, use that method.
In performance critical code, though, load the bitvector data
one byte at a time and iterate only over set bits.
To support that, add and use sys.Ctz8.
name old time/op new time/op delta
StackCopyPtr-8 81.8ms ± 5% 78.9ms ± 3% -3.58% (p=0.000 n=97+96)
StackCopy-8 65.9ms ± 3% 62.8ms ± 3% -4.67% (p=0.000 n=96+92)
StackCopyNoCache-8 105ms ± 3% 102ms ± 3% -3.38% (p=0.000 n=96+95)
Change-Id: I00b80f45612708bd440b1a411a57fa6dfa24aa74
Reviewed-on: https://go-review.googlesource.com/109716
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'test/prove.go')
0 files changed, 0 insertions, 0 deletions