• Changkun Ou's avatar
    runtime: one lock per order · 3c561434
    Changkun Ou authored
    This CL implements one lock per order of stackpool. It improves performance when mutator stack growth deeply, see benchmark below:
    
    ```
    name                old time/op  new time/op  delta
    StackGrowth-8       3.60ns ± 5%  3.59ns ± 1%    ~     (p=0.794 n=10+9)
    StackGrowthDeep-8    370ns ± 1%   335ns ± 1%  -9.47%  (p=0.000 n=9+9)
    StackCopyPtr-8      72.6ms ± 0%  71.6ms ± 1%  -1.31%  (p=0.000 n=9+9)
    StackCopy-8         53.5ms ± 0%  53.2ms ± 1%  -0.54%  (p=0.006 n=8+9)
    StackCopyNoCache-8   100ms ± 0%    99ms ± 0%  -0.70%  (p=0.000 n=8+8)
    ```
    
    Change-Id: I1170d3fd9e6ff8516e25f669d0aaf1861311420f
    GitHub-Last-Rev: 13b820cddd8008079c98d01ac22dd123a46a6603
    GitHub-Pull-Request: golang/go#33399
    Reviewed-on: https://go-review.googlesource.com/c/go/+/188478
    Run-TryBot: Keith Randall <khr@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarKeith Randall <khr@golang.org>
    3c561434
stack.go 39 KB