• Keith Randall's avatar
    runtime: get rid of the settype buffer and lock. · 3b5278fc
    Keith Randall authored
    MCaches	now hold a MSpan for each sizeclass which they have
    exclusive access to allocate from, so no lock is needed.
    
    Modifying the heap bitmaps also no longer requires a cas.
    
    runtime.free gets more expensive.  But we don't use it
    much any more.
    
    It's not much faster on 1 processor, but it's a lot
    faster on multiple processors.
    
    benchmark                 old ns/op    new ns/op    delta
    BenchmarkSetTypeNoPtr1           24           23   -0.42%
    BenchmarkSetTypeNoPtr2           33           34   +0.89%
    BenchmarkSetTypePtr1             51           49   -3.72%
    BenchmarkSetTypePtr2             55           54   -1.98%
    
    benchmark                old ns/op    new ns/op    delta
    BenchmarkAllocation          52739        50770   -3.73%
    BenchmarkAllocation-2        33957        34141   +0.54%
    BenchmarkAllocation-3        33326        29015  -12.94%
    BenchmarkAllocation-4        38105        25795  -32.31%
    BenchmarkAllocation-5        68055        24409  -64.13%
    BenchmarkAllocation-6        71544        23488  -67.17%
    BenchmarkAllocation-7        68374        23041  -66.30%
    BenchmarkAllocation-8        70117        20758  -70.40%
    
    LGTM=rsc, dvyukov
    R=dvyukov, bradfitz, khr, rsc
    CC=golang-codereviews
    https://golang.org/cl/46810043
    3b5278fc
Name
Last commit
Last update
..
archive Loading commit data...
bufio Loading commit data...
builtin Loading commit data...
bytes Loading commit data...
compress Loading commit data...
container Loading commit data...
crypto Loading commit data...
database/sql Loading commit data...
debug Loading commit data...
encoding Loading commit data...
errors Loading commit data...
expvar Loading commit data...
flag Loading commit data...
fmt Loading commit data...
go Loading commit data...
hash Loading commit data...
html Loading commit data...
image Loading commit data...
index/suffixarray Loading commit data...
io Loading commit data...
log Loading commit data...
math Loading commit data...
mime Loading commit data...
net Loading commit data...
os Loading commit data...
path Loading commit data...
reflect Loading commit data...
regexp Loading commit data...
runtime Loading commit data...
sort Loading commit data...
strconv Loading commit data...
strings Loading commit data...
sync Loading commit data...
syscall Loading commit data...
testing Loading commit data...
text Loading commit data...
time Loading commit data...
unicode Loading commit data...
unsafe Loading commit data...