LEFT | RIGHT |
1 // Copyright 2012 The Go Authors. All rights reserved. | 1 // Copyright 2012 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package runtime_test | 5 package runtime_test |
6 | 6 |
7 import "testing" | 7 import "testing" |
8 | 8 |
9 // arm soft division tests adapted from· | 9 // arm soft division benchmarks adapted from· |
10 // http://ridiculousfish.com/files/division_benchmarks.tar.gz | 10 // http://ridiculousfish.com/files/division_benchmarks.tar.gz |
11 | 11 |
12 const numeratorsSize = 1 << 21 | 12 const numeratorsSize = 1 << 21 |
13 | 13 |
14 var numerators = randomNumerators() | 14 var numerators = randomNumerators() |
15 | 15 |
16 type randstate struct { | 16 type randstate struct { |
17 hi, lo uint32 | 17 hi, lo uint32 |
18 } | 18 } |
19 | 19 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 func BenchmarkUint32Mod7(b *testing.B) { bmUint32Mod(7, b) } | 61 func BenchmarkUint32Mod7(b *testing.B) { bmUint32Mod(7, b) } |
62 func BenchmarkUint32Mod37(b *testing.B) { bmUint32Mod(37, b) } | 62 func BenchmarkUint32Mod37(b *testing.B) { bmUint32Mod(37, b) } |
63 func BenchmarkUint32Mod123(b *testing.B) { bmUint32Mod(123, b) } | 63 func BenchmarkUint32Mod123(b *testing.B) { bmUint32Mod(123, b) } |
64 func BenchmarkUint32Mod763(b *testing.B) { bmUint32Mod(763, b) } | 64 func BenchmarkUint32Mod763(b *testing.B) { bmUint32Mod(763, b) } |
65 func BenchmarkUint32Mod1247(b *testing.B) { bmUint32Mod(1247, b) } | 65 func BenchmarkUint32Mod1247(b *testing.B) { bmUint32Mod(1247, b) } |
66 func BenchmarkUint32Mod9305(b *testing.B) { bmUint32Mod(9305, b) } | 66 func BenchmarkUint32Mod9305(b *testing.B) { bmUint32Mod(9305, b) } |
67 func BenchmarkUint32Mod13307(b *testing.B) { bmUint32Mod(13307, b) } | 67 func BenchmarkUint32Mod13307(b *testing.B) { bmUint32Mod(13307, b) } |
68 func BenchmarkUint32Mod52513(b *testing.B) { bmUint32Mod(52513, b) } | 68 func BenchmarkUint32Mod52513(b *testing.B) { bmUint32Mod(52513, b) } |
69 func BenchmarkUint32Mod60978747(b *testing.B) { bmUint32Mod(60978747, b) } | 69 func BenchmarkUint32Mod60978747(b *testing.B) { bmUint32Mod(60978747, b) } |
70 func BenchmarkUint32Mod106956295(b *testing.B) { bmUint32Mod(106956295, b) } | 70 func BenchmarkUint32Mod106956295(b *testing.B) { bmUint32Mod(106956295, b) } |
LEFT | RIGHT |