• Dmitriy Vyukov's avatar
    cmd/gc: allocate select descriptor on stack · 40d7d5a6
    Dmitriy Vyukov authored
    benchmark                      old ns/op     new ns/op     delta
    BenchmarkSelectUncontended     220           165           -25.00%
    BenchmarkSelectContended       209           161           -22.97%
    BenchmarkSelectProdCons        1042          904           -13.24%
    
    But more importantly this change will allow
    to get rid of free function in runtime.
    
    Fixes #6494.
    
    LGTM=rsc, khr
    R=golang-codereviews, rsc, dominik.honnef, khr
    CC=golang-codereviews, remyoudompheng
    https://golang.org/cl/107670043
    40d7d5a6
chan.goc 23.8 KB