]> Cypherpunks repositories - gostls13.git/commit
bytes: SSE for bytes.IndexByte on amd64
authorEvan Shaw <chickencha@gmail.com>
Tue, 9 Nov 2010 01:33:53 +0000 (17:33 -0800)
committerRob Pike <r@golang.org>
Tue, 9 Nov 2010 01:33:53 +0000 (17:33 -0800)
commit49fdfe21dd5d1a08b1edaac5c0caeedf492d32e2
tree66bc5da9747df76e04fbc5e273ca3f77c4acaa5f
parente9c901dbf4673443cc151d2e53100c0ebff48a44
bytes: SSE for bytes.IndexByte on amd64

Performance on 2.8 GHz Intel Core i7:

Before:
BenchmarkIndexByte4K  1000000              2997 ns/op        1366.70 MB/s
BenchmarkIndexByte4M      500           3049772 ns/op        1375.28 MB/s
BenchmarkIndexByte64M      50          49582280 ns/op        1353.48 MB/s

After:
BenchmarkIndexByte4K 10000000               298 ns/op       13744.97 MB/s
BenchmarkIndexByte4M    10000            285993 ns/op       14665.76 MB/s
BenchmarkIndexByte64M     500           4618172 ns/op       14531.48 MB/s

R=rsc, PeterGo, r2, r
CC=golang-dev
https://golang.org/cl/2888041
src/pkg/bytes/asm_amd64.s
src/pkg/bytes/bytes_test.go