]> Cypherpunks repositories - gostls13.git/commit
runtime: avoid using REP prefix for IndexByte
authorKeith Randall <khr@golang.org>
Sat, 16 Jan 2016 02:17:09 +0000 (18:17 -0800)
committerKeith Randall <khr@golang.org>
Fri, 26 Feb 2016 01:09:53 +0000 (01:09 +0000)
commit687abca1ea828dd4745d50c351f3b73ccd4d09be
tree91b98da3bac8c6916f81e2a555551010837ded11
parenta337e30620ca8557943190a988f53487ced68f05
runtime: avoid using REP prefix for IndexByte

REP-prefixed instructions have a large startup cost.
Avoid them like the plague.

benchmark                  old ns/op     new ns/op     delta
BenchmarkIndexByte10-8     22.4          5.34          -76.16%

Fixes #13983

Change-Id: I857e956e240fc9681d053f2584ccf24c1b272bb3
Reviewed-on: https://go-review.googlesource.com/18703
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/bytes/bytes_test.go
src/runtime/asm_amd64.s