• Austin Clements's avatar
    runtime: use buffered write barrier for bulkBarrierPreWrite · 877387e3
    Austin Clements authored
    This modifies bulkBarrierPreWrite to use the buffered write barrier
    instead of the eager write barrier. This reduces the number of system
    stack switches and sanity checks by a factor of the buffer size
    (currently 256). This affects both typedmemmove and typedmemclr.
    
    Since this is purely a runtime change, it applies to all arches
    (unlike the pointer write barrier).
    
    name                 old time/op  new time/op  delta
    BulkWriteBarrier-12  7.33ns ± 6%  4.46ns ± 9%  -39.10%  (p=0.000 n=20+19)
    
    Updates #22460.
    
    Change-Id: I6a686a63bbf08be02b9b97250e37163c5a90cdd8
    Reviewed-on: https://go-review.googlesource.com/73832
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
    877387e3
mbitmap.go 61.7 KB