]> Cypherpunks repositories - gostls13.git/commit
runtime: add BenchmarkMemclrRange
authornimelehin <nimelehin@gmail.com>
Tue, 21 Dec 2021 19:45:01 +0000 (22:45 +0300)
committerGopher Robot <gobot@golang.org>
Fri, 20 May 2022 13:51:52 +0000 (13:51 +0000)
commit5370494577bb0844d3fdfa6bebd27bf9285bb764
treee7c19aaeb5abee4caafc134d797d94bdb614d90d
parentd8762b2f4532cc2e5ec539670b88bbc469a13938
runtime: add BenchmarkMemclrRange

This benchmark is added to test improvements in memclr_amd64.
As it is stated in Intel Optimization Manual 15.16.3.3, AVX2-implemented
memclr can produce a skewed result with the branch predictor being
trained by the large loop iteration count.

This benchmark generates sizes between some specified range. This should
help to measure how memclr works when branch predictors may be incorrectly
trained.

Change-Id: I14d173cafe43ca47198ed920e655547a66b3909f
Reviewed-on: https://go-review.googlesource.com/c/go/+/373362
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Keith Randall <khr@google.com>
src/runtime/memmove_test.go