• Rick Hudson's avatar
    [dev.garbage] runtime: use sys.Ctz64 intrinsic · 2fb75ea6
    Rick Hudson authored
    Our compilers now provides instrinsics including
    sys.Ctz64 that support CTZ (count trailing zero)
    instructions. This CL replaces the Go versions
    of CTZ with the compiler intrinsic.
    
    Count trailing zeros CTZ finds the least
    significant 1 in a word and returns the number
    of less significant 0s in the word.
    
    Allocation uses the bitmap created by the garbage
    collector to locate an unmarked object. The logic
    takes a word of the bitmap, complements, and then
    caches it. It then uses CTZ to locate an available
    unmarked object. It then shifts marked bits out of
    the bitmap word preparing it for the next search.
    Once all the unmarked objects are used in the
    cached work the bitmap gets another word and
    repeats the process.
    
    Change-Id: Id2fc42d1d4b9893efaa2e1bd01896985b7e42f82
    Reviewed-on: https://go-review.googlesource.com/21366Reviewed-by: 's avatarAustin Clements <austin@google.com>
    2fb75ea6
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
dev.garbage Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...