aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/string.goc
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2014-06-16 21:00:37 -0700
committerKeith Randall <khr@golang.org>2014-06-16 21:00:37 -0700
commitb36ed9056ff57c04c34240f2dc6b1bb59e84d0c7 (patch)
treede1d8c2c62006b26585cf57e0dcb25b88178e6e9 /src/pkg/runtime/string.goc
parent38eea5b2ad6a6bf108cf4445506559118e34d782 (diff)
downloadgo-b36ed9056ff57c04c34240f2dc6b1bb59e84d0c7.tar.xz
runtime: implement eqstring in assembly.
BenchmarkCompareStringEqual 10.4 7.33 -29.52% BenchmarkCompareStringIdentical 3.99 3.67 -8.02% BenchmarkCompareStringSameLength 9.80 6.84 -30.20% BenchmarkCompareStringDifferentLength 1.09 0.95 -12.84% BenchmarkCompareStringBigUnaligned 75220 76071 +1.13% BenchmarkCompareStringBig 69843 74746 +7.02% LGTM=bradfitz, josharian R=golang-codereviews, bradfitz, josharian, dave, khr CC=golang-codereviews https://golang.org/cl/105280044
Diffstat (limited to 'src/pkg/runtime/string.goc')
-rw-r--r--src/pkg/runtime/string.goc12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/pkg/runtime/string.goc b/src/pkg/runtime/string.goc
index 97a69d07b1..64a1d9064b 100644
--- a/src/pkg/runtime/string.goc
+++ b/src/pkg/runtime/string.goc
@@ -206,18 +206,6 @@ func concatstrings(s Slice) (res String) {
res = concatstring(s.len, (String*)s.array);
}
-func eqstring(s1 String, s2 String) (v bool) {
- if(s1.len != s2.len) {
- v = false;
- return;
- }
- if(s1.str == s2.str) {
- v = true;
- return;
- }
- v = runtime·memeq(s1.str, s2.str, s1.len);
-}
-
int32
runtime·strcmp(byte *s1, byte *s2)
{