]> Cypherpunks repositories - gostls13.git/commit
strings: use AVX2 for Index if available
authorIlya Tocar <ilya.tocar@intel.com>
Thu, 28 Apr 2016 14:39:55 +0000 (17:39 +0300)
committerIlya Tocar <ilya.tocar@intel.com>
Wed, 7 Sep 2016 10:43:13 +0000 (10:43 +0000)
commit0cff219c1279cb76f042004bffcefba0a169cb67
treea929e6aaf14d9307523a72b278d053854676d7bb
parent83c73a85db84a04c8e60e52cfa348fc6b675fbf7
strings: use AVX2 for Index if available

IndexHard4-4      1.50ms ± 2%  0.71ms ± 0%  -52.36%  (p=0.000 n=20+19)

This also fixes a bug, that caused a string of length 16 to use
two 8-byte comparisons instead of one 16-byte. And adds a test for
cases when partial_match fails.

Change-Id: I1ee8fc4e068bb36c95c45de78f067c822c0d9df0
Reviewed-on: https://go-review.googlesource.com/22551
Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/bytes/bytes_amd64.go
src/runtime/asm_amd64.s
src/strings/strings_amd64.go
src/strings/strings_test.go