• Evan Shaw's avatar
    bytes: SSE for bytes.IndexByte on amd64 · 49fdfe21
    Evan Shaw authored
    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
    49fdfe21
asm_amd64.s 1.61 KB