• Dmitriy Vyukov's avatar
    runtime: per-P defer pool · 1ba04c17
    Dmitriy Vyukov authored
    Instead of a per-goroutine stack of defers for all sizes,
    introduce per-P defer pool for argument sizes 8, 24, 40, 56, 72 bytes.
    
    For a program that starts 1e6 goroutines and then joins then:
    old: rss=6.6g virtmem=10.2g time=4.85s
    new: rss=4.5g virtmem= 8.2g time=3.48s
    
    R=golang-codereviews, rsc
    CC=golang-codereviews
    https://golang.org/cl/42750044
    1ba04c17
msize.c 5.63 KB