aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/runtime.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2012-05-29 14:02:29 -0400
committerRuss Cox <rsc@golang.org>2012-05-29 14:02:29 -0400
commit6dbaa206fbe7345fac181ec3d91a4157d5532fbd (patch)
tree204ab4c0484f2f4febe859e9f3bd83723ea2e9d1 /src/pkg/runtime/runtime.c
parent90d59c586197a2300188206e4bbe99bb714e1833 (diff)
downloadgo-6dbaa206fbe7345fac181ec3d91a4157d5532fbd.tar.xz
runtime: replace runtime·rnd function with ROUND macro
It's sad to introduce a new macro, but rnd shows up consistently in profiles, and the function call overwhelms the two arithmetic instructions it performs. R=r CC=golang-dev https://golang.org/cl/6260051
Diffstat (limited to 'src/pkg/runtime/runtime.c')
-rw-r--r--src/pkg/runtime/runtime.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/pkg/runtime/runtime.c b/src/pkg/runtime/runtime.c
index 2cb3501dd1..cca061be79 100644
--- a/src/pkg/runtime/runtime.c
+++ b/src/pkg/runtime/runtime.c
@@ -156,19 +156,6 @@ runtime·mchr(byte *p, byte c, byte *ep)
return nil;
}
-uint32
-runtime·rnd(uint32 n, uint32 m)
-{
- uint32 r;
-
- if(m > maxround)
- m = maxround;
- r = n % m;
- if(r)
- n += m-r;
- return n;
-}
-
static int32 argc;
static uint8** argv;