commit | a7a854b82f99c4fb08e44b3c942a3361894cf4b5 | [log] [tgz] |
---|---|---|
author | Brad Fitzpatrick <bradfitz@golang.org> | Mon Mar 28 09:41:57 2011 -0700 |
committer | Brad Fitzpatrick <bradfitz@golang.org> | Mon Mar 28 09:41:57 2011 -0700 |
tree | 780ed383841d4f4cac7370eb624ca05cb0d9fe90 | |
parent | 43512e6c7007b3cca7b693064e0f1da8e47e154f [diff] |
strings: Map: avoid allocation when string is unchanged This speeds up strings.ToLower, etc. before/after: strings_test.BenchmarkMapNoChanges 1000000 1013 ns/op strings_test.BenchmarkMapNoChanges 5000000 442 ns/op R=r, rog, eh, rsc CC=golang-dev https://golang.org/cl/4306056