From fe9991e8b29d261f12a0a0a15b89d67a29f5299d Mon Sep 17 00:00:00 2001 From: Quan Yong Zhai Date: Tue, 12 Jul 2011 17:30:40 -0700 Subject: runtime: replace runtime.mcpy with runtime.memmove faster string operations, and more tested on linux/386 runtime_test.BenchmarkSliceToString 642 532 -17.13% runtime_test.BenchmarkStringToSlice 636 528 -16.98% runtime_test.BenchmarkConcatString 1109 897 -19.12% R=r, iant, rsc CC=golang-dev https://golang.org/cl/4674042 --- src/pkg/runtime/runtime.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/pkg/runtime/runtime.c') diff --git a/src/pkg/runtime/runtime.c b/src/pkg/runtime/runtime.c index 83af8dc5e2..7e37d66d41 100644 --- a/src/pkg/runtime/runtime.c +++ b/src/pkg/runtime/runtime.c @@ -116,17 +116,6 @@ runtime·panicstring(int8 *s) runtime·panic(err); } -void -runtime·mcpy(byte *t, byte *f, uint32 n) -{ - while(n > 0) { - *t = *f; - t++; - f++; - n--; - } -} - int32 runtime·mcmp(byte *s1, byte *s2, uint32 n) { -- cgit v1.3-5-g9baa