• Dmitriy Vyukov's avatar
    sync: replace Mutex benchmarks · 5c15f871
    Dmitriy Vyukov authored
    For both contended and uncontended case:
     - support arbitrary number of cpus (not just 2)
     - dynamic load balancing (improves stability)
     - periodic execution of Gosched() to work around non-preemptiviness
    For uncontended case eliminates possible false-sharing.
    For contended case includes additional variation with some
    amount of local work between mutex operations.
    
    R=r, rsc
    CC=golang-dev
    https://golang.org/cl/4634093
    5c15f871
mutex_test.go 2.87 KB