• 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
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...