]> Cypherpunks repositories - gostls13.git/commit
strings: remove overengineered Compare implementation
authorRuss Cox <rsc@golang.org>
Sun, 18 Jan 2015 17:50:22 +0000 (12:50 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 19 Jan 2015 02:19:17 +0000 (02:19 +0000)
commitfd4dc91a96518fdbb47781f97ba43ae36df215a5
tree1bfe9dca937db5ad6c7fb9a3b49e21b529ab5303
parente832043e7293cf3237e35ffc3b645c8d04d11f77
strings: remove overengineered Compare implementation

The function is here ONLY for symmetry with package bytes.
This function should be used ONLY if it makes code clearer.
It is not here for performance. Remove any performance benefit.

If performance becomes an issue, the compiler should be fixed to
recognize the three-way compare (for all comparable types)
rather than encourage people to micro-optimize by using this function.

Change-Id: I71f4130bce853f7aef724c6044d15def7987b457
Reviewed-on: https://go-review.googlesource.com/3012
Reviewed-by: Rob Pike <r@golang.org>
src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/asm_amd64p32.s
src/runtime/noasm.go
src/strings/compare.go [new file with mode: 0644]
src/strings/strings_decl.go