blob: 9d8e98cdccff82520a220e7b45e5fa6d1b6d6123 [file] [log] [blame] [view]
Andrew Gerrand5bc444d2014-12-10 11:35:11 +11001# Introduction
2
Minux Ma08f58342016-12-22 21:12:28 -05003Go is fully supported on Linux and Darwin. Any Go program that you can compile for x86/x86\_64 should work on Arm. Besides Linux and Darwin, Go is also experimentally supported on FreeBSD, OpenBSD and NetBSD.
Andrew Gerrand5bc444d2014-12-10 11:35:11 +11004
5# Supported architectures
6
7Go supports the following ARM architectural families.
8
Buchi Reddy Busi Reddy07a8adc2016-04-13 10:12:31 -07009| **Architecture** | **Status** | **GOARM value** | **GOARCH value** |
10|:-----------------|:-----------|:----------------|:-----------------|
11| ARMv4 and below | sorry, not supported | n/a | n/a |
12| ARMv5 | supported | GOARM=5 | GOARCH=arm |
13| ARMv6 | supported | GOARM=6 | GOARCH=arm |
14| ARMv7 | supported | GOARM=7 | GOARCH=arm |
15| ARMv8 | supported | n/a | GOARCH=arm64 |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110016
Buchi Reddy Busi Reddy07a8adc2016-04-13 10:12:31 -070017Starting from Go 1.1, the appropriate GOARM value will be chosen if you compile the program from source on the target machine. In cross compilation situations, it is recommended that you always set an appropriate GOARM value along with GOARCH.
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110018
19# Supported operating systems
20
Burcu Dogan3e40cdf2015-11-27 11:47:27 -080021* ARM on Linux. You must run an [EABI](http://wiki.debian.org/ArmEabiPort) kernel. These are generally known as `armel` for softfloat (compatible with ARMv5) or `armhf` for hardware floating point (ARMv6 and above).
Minux Ma50bb0d82016-12-23 00:17:53 -050022* ARM on Darwin: ARMv7 is required.
Minux Ma169b7342016-12-22 21:12:56 -050023* ARM on FreeBSD, OpenBSD, and NetBSD: ARMv6K or above is required.
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110024
25# Recommended Go version
26
27The recommended minimum version for running Go on arm systems is Go 1.1.
28
29# Tips and tricks
30
31## /tmp and tmpfs
32The ` go ` build tool uses ` /tmp ` when compiling and testing, this can cause heavy wear and tear if ` /tmp ` lives on your SD card. To minimise this effect, either ` export TMPDIR ` to somewhere that lives on another filesystem. Alternatively if you have lots of physical memory you can mount a swap backed tmpfs filesystem on /tmp by adding this line to ` /etc/fstab `
33
34```
35tmpfs /tmp tmpfs nodev,nosuid,mode=1777 0 0
36```
37
38## Swap
39Building Go from source requires at least 256mb of RAM. Running the tests requires at least 256mb of memory and at least 512mb of swap space.
40
Hilmar Lapp84488f62016-01-14 19:42:56 -050041## Test failures due to resource starvation
42The runtime tests create many native operating system threads which at the default of 8mb per thread can exhaust an ARM system with 32bit user mode address space (especially on multicore ARM systems such as the Raspberry PI 2). To prevent the runtime test from failing you may need lower the thread stack limit:
43
44```sh
45% ulimit -s 1024 # set the thread stack limit to 1mb
46% ulimit -s # check that it worked
471024
48```
49See [Dave Cheney's blog post about building Go on Raspberry Pi](http://dave.cheney.net/2015/09/04/building-go-1-5-on-the-raspberry-pi) for details.
50
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110051## Build failures due to lack of memory
52The Go tool will try to keep all your cpu cores busy when installing packages (during make.bash),
53this is normally preferable on PCs where memory is abundant.
54However, some powerful multicore ARM machines don't have enough memory to support parallel
55builds utilizing all available cores, and you can work around that by using the ` taskset(1) ` utility
56to limit Go to only use one core without resorting to swaps.
57```
58taskset 1 ./make.bash # use 3 if you want to use two cores
59```
60Note: the 1 here is a bitmask for cpu affinity and it's not the number of cpu cores you're
61willing to use, please refer to ` taskset(1) ` manual for details.
62
63# Known issues
64
65## Lack of floating point hardware on ARMv5
Dan Rollo543311a2017-01-26 18:00:20 -050066The major issue with ARMv5 is the lack of floating point support in common ARMv5 hardware<sup>†</sup>. When compiled with the GOARM=5 environment variable, the 5l linker will insert a call to ` _sfloat ` before any block of floating point instructions to branch into the floating point emulator. This means that binaries produced with a Go installation that was compiled with soft float support will work on all supported architectures, but builds compiled without soft floating point support will not work on ARMv5.
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110067
68<sup>†</sup> This isn't strictly true, there exist ARMv5 implementations which have VFP1 floating point. However the compiler doesn't support VFP1 yet.
69
70## html/template and test/nilptr.go test fail on HTC Android
71html/template test and test/nilptr.go is known to fail on HTC's Android kernels ([ref](http://www.mail-archive.com/android-developers@googlegroups.com/msg153389.html)), because the kernel will kill the application after 10 segfaults.
72
73## Potential kernel bug in 2.6.32-5-kirkwood on QNAP 219P
nathany2c4a8d92014-12-10 22:16:11 -080074See [Issue 5466](https://github.com/golang/go/issues/5466) for details. Updating to 3.2.0-4-kirkwood solved the issue.
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110075
76# Success stories
77
78ARM hardware comes in a myriad of shapes and sizes. If you've had a success story building and running Go on your Arm system, please detail your results here.
79
80## Netgear Stora
81
82Architecture: ARMv5
83
84Operating System: Debian Sid
85
86The Netgear Stora is an ARMv5 (Marvell Kirkwood) platform. I flashed mine with a Debian Sid distribution and it was, until Go1, a solid platform for Go development. The main drawback is the Stora only has 128mb of ram, which is not quite enough to run ./all.bash as 5l can use more than 100mb of ram when linking some commands.
87
88Instructions for installing Debian on your Stora can be found on the OpenStora website, http://www.openstora.com/wiki/index.php?title=How_to_install_Debian_Linux_on_NETGEAR_Stora.
89
90> _-- dave cheney_
91
92## Qnap TS-119P II
93
94Architecture: ARMv5
95
96Operating System: Debian Squeeze
97
98The Qnap TS series of NASs are excellent hackable little linux hosts. The TS-11P9 II is a 2Ghz Marvell Kirkwood ARMv5 processor with 512mb of ram and a single SATA drive bay.
99
100The kirkwood platform is supported by the native debian installer. http://www.cyrius.com/debian/kirkwood/qnap/ts-119/install.html
101
102> _-- dave cheney_
103
104## Pandaboard
105
106Architecture: ARMv7
107
108Operating System: Ubuntu 12.04LTS (armhf)
109
110The Pandaboard is a dual core ARMv7 development board based on the Texas Instruments OMAP4 SoC platform. I run ubuntu 12.04 LTS server on mine, which is an excellent distribution for Arm development. The Pandaboard has a gig of ram which makes it excellent for development and benchmarking.
111
112Instructions and SD card image can be found on on the Ubuntu wiki, https://wiki.ubuntu.com/ARM/Server/Install#Installing_pre-installed_OMAP4_Precise_.2812.04.29_Server_Images.
113
114> _-- dave cheney_
115
116## BeagleBone
117
118Architecture: ARMv7 single core, Cortex-A8, 256MB RAM, 720 MHz
119
120Operating System: Angstrom Linux
121
122BeagleBone is similar to Beagleboard, but without the video components. Angstrom is a very small Linux distribution for ARM based systems. It is built on top of Yocto and OpenEmbedded with additional tools and recipes to make it even easier to build a distribution. You can think of Angstrom as Ubuntu and OpenEmbedded/Yocto as Debian. Angstrom is very light weight and fast compared to Ubuntu. It uses systemd instead of the sys5 scripts which help give you a very fast boot time of a few seconds.
123
124BeagleBone is probably faster than a RasberryPI because of it's newer Cortex-A8 dual-issue superscalar architecture, but the PI has the GPU which theoretically could be used with something like OpenCL to really run circles around the BeagleBone. However, for embedded applications the BeagleBone is easier to work with because it is ready out of the box with GPIO connections.
125
126I've cross compiled for ARM with 5g from a Mac and so far I haven't run into any problems. You can build on the BeagleBone, but cross compiling with Go is so easy that it is better to save wear and tear on the flash drive and just compile somewhere else.
127
128> _-- hans stimer_
129
130### Zyxel NSA 310
131
132Architecture: ARM5
133Platform: Debian Wheeze
134
135Successfuly built default branch, going to write fan control daemon for this device in golang.
136
137### Raspberry Pi
138
Jason Bubereld8d72c92015-09-07 15:58:27 -0700139* [Building Go 1.5 on the Raspberry Pi - Dave Cheney](http://dave.cheney.net/2015/09/04/building-go-1-5-on-the-raspberry-pi)
140
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100141Architecture: ARM1176JZFS, with floating point, running at 700Mhz
142
143Operating System: Debian Wheezy beta distribution (http://www.raspberrypi.org/archives/1435) reported as:
144
145` Linux raspberrypi 3.1.9+ #125 PREEMPT Sun Jun 17 16:09:36 BST 2012 armv6l GNU/Linux `
146
147**Memory Split**: the Pi shares its 256mb of memory between the CPU and the GPU. You should allocate as much memory as possible to the CPU for a successful compilation. The configuration for the memory split is stored on your SD card. This link has a script to adjust the configuration, http://sirlagz.net/?p=445.
148
149Go version weekly.2012-03-27 +645947213cac, with timeout and GOARM 7 patches http://codereview.appspot.com/5987063/) builds with 2 test failures: encoding/gob fails with out of memory, and fmt fails the NaN test.
150
151Successfully installed and run SVGo via go get github.com/ajstarks/svgo, tested with goplay:
152
153![http://farm8.staticflickr.com/7139/7451061716_fbb585c55f.jpg](http://farm8.staticflickr.com/7139/7451061716_fbb585c55f.jpg)
154
155Division benchmark via http://codereview.appspot.com/6258067:
156
157
158```
159$ cd $GOROOT/src/pkg/runtime
160$ go test -test.bench=BenchmarkUint
161
162
163BenchmarkUint32Div7 5000000 547 ns/op
164BenchmarkUint32Div37 5000000 547 ns/op
165BenchmarkUint32Div123 5000000 547 ns/op
166BenchmarkUint32Div763 5000000 547 ns/op
167BenchmarkUint32Div1247 5000000 547 ns/op
168BenchmarkUint32Div9305 5000000 547 ns/op
169BenchmarkUint32Div13307 5000000 547 ns/op
170BenchmarkUint32Div52513 5000000 547 ns/op
171BenchmarkUint32Div60978747 5000000 547 ns/op
172BenchmarkUint32Div106956295 5000000 547 ns/op
173BenchmarkUint32Mod7 5000000 547 ns/op
174BenchmarkUint32Mod37 5000000 547 ns/op
175BenchmarkUint32Mod123 5000000 547 ns/op
176BenchmarkUint32Mod763 5000000 547 ns/op
177BenchmarkUint32Mod1247 5000000 547 ns/op
178BenchmarkUint32Mod9305 5000000 547 ns/op
179BenchmarkUint32Mod13307 5000000 547 ns/op
180BenchmarkUint32Mod52513 5000000 547 ns/op
181BenchmarkUint32Mod60978747 5000000 547 ns/op
182BenchmarkUint32Mod106956295 5000000 547 ns/op
183```
184
185Running the hardware floating point distribution, Raspbian "pisces" (http://www.raspbian.org/PiscesImages) and applying the patches in https://gist.github.com/3116118, here are the results of the Eleanor McHugh gospeed benchmark:
186
187```
188raspbian@pisces:~/gowork/src/github.com/feyeleanor/gospeed$ uname -a
189Linux pisces 3.1.9+ #171 PREEMPT Tue Jul 17 01:08:22 BST 2012 armv6l GNU/Linux
190raspbian@pisces:~/gowork/src/github.com/feyeleanor/gospeed$ go test -test.bench=".*"
191PASS
192BenchmarkBaselineCastInt32ToInt 100000000 13.5 ns/op
193BenchmarkBaselineCastIntToInt32 100000000 13.5 ns/op
194BenchmarkBaselineCastInt64ToUint64 100000000 17.8 ns/op
195BenchmarkBaselineCastUint64ToInt64 100000000 17.2 ns/op
196BenchmarkBaselineVariableGet 100000000 13.4 ns/op
197BenchmarkBaselineVariableSet 100000000 22.4 ns/op
198BenchmarkBaselineVariableGetInterface 100000000 13.5 ns/op
199BenchmarkBaselineVariableSetInterface 50000000 31.3 ns/op
200BenchmarkBaselineVariableIncrement 100000000 23.9 ns/op
201BenchmarkBaselineVariableDecrement 100000000 23.9 ns/op
202BenchmarkBaselineFieldGet 100000000 13.5 ns/op
203BenchmarkBaselineFieldSet 100000000 20.9 ns/op
204BenchmarkBaselineSliceGet 50000000 32.9 ns/op
205BenchmarkBaselineSliceSet 50000000 34.5 ns/op
206BenchmarkBaselineMapIntGet 1000000 1448 ns/op
207BenchmarkBaselineMapIntSet 1000000 1968 ns/op
208BenchmarkBaselineMapStringGet 1000000 1119 ns/op
209BenchmarkBaselineMapStringSet 1000000 1675 ns/op
210BenchmarkBaselineIf 100000000 15.0 ns/op
211BenchmarkBaselineIfElse 100000000 15.0 ns/op
212BenchmarkBaselineSwitchDefault 100000000 13.5 ns/op
213BenchmarkBaselineSwitchOneCase 100000000 15.0 ns/op
214BenchmarkBaselineSwitchTwoCases 100000000 18.0 ns/op
215BenchmarkBaselineSwitchTwoCasesFallthrough 100000000 18.0 ns/op
216BenchmarkBaselineForLoopIteration 50000000 42.0 ns/op
217BenchmarkBaselineForReverseLoopIteration 50000000 36.0 ns/op
218BenchmarkBaselineForRange 20000000 80.9 ns/op
219BenchmarkBaselineForSliceLength 50000000 39.0 ns/op
220BenchmarkBaselineForReverseSliceLength 50000000 36.0 ns/op
221BenchmarkBaselineForLoopIteration10 20000000 119 ns/op
222BenchmarkBaselineForReverseLoopIteration10 20000000 92.9 ns/op
223BenchmarkBaselineForRange10 10000000 215 ns/op
224BenchmarkBaselineForSliceLength10 20000000 109 ns/op
225BenchmarkBaselineForReverseSliceLength10 20000000 92.9 ns/op
226BenchmarkBaselineForLoopIteration100 2000000 929 ns/op
227BenchmarkBaselineForReverseLoopIteration100 5000000 700 ns/op
228BenchmarkBaselineForRange100 1000000 1567 ns/op
229BenchmarkBaselineForSliceLength100 2000000 853 ns/op
230BenchmarkBaselineForReverseSliceLength100 5000000 700 ns/op
231BenchmarkBaselineForLoopIteration10000 10000 106006 ns/op
232BenchmarkBaselineForReverseLoopIteration10000 50000 67480 ns/op
233BenchmarkBaselineForRange10000 10000 153841 ns/op
234BenchmarkBaselineForSliceLength10000 20000 85735 ns/op
235BenchmarkBaselineForReverseSliceLength10000 50000 69461 ns/op
236BenchmarkBaselineMakeChannelBoolUnbuffered 200000 10162 ns/op
237BenchmarkBaselineMakeChannelBool1 200000 12517 ns/op
238BenchmarkBaselineMakeChannelBool10 200000 12521 ns/op
239BenchmarkBaselineMakeChannelStringUnbuffered 500000 10369 ns/op
240BenchmarkBaselineMakeChannelString1 200000 12576 ns/op
241BenchmarkBaselineMakeChannelString10 100000 22358 ns/op
242BenchmarkBaselineGo 50000 367593 ns/op
243BenchmarkBaselineFunctionCall 50000000 57.0 ns/op
244BenchmarkBaselineFunctionCallArg 20000000 81.0 ns/op
245BenchmarkBaselineFunctionCall5VarArgs 500000 6852 ns/op
246BenchmarkBaselineFunctionCallInt 50000000 60.3 ns/op
247BenchmarkBaselineFunctionCall5VarInts 1000000 3185 ns/op
248BenchmarkBaselineFunctionCallWithDefer 1000000 2330 ns/op
249BenchmarkBaselineFunctionCallPanicRecover 500000 6222 ns/op
250BenchmarkBaselineMethodCallDirect 20000000 83.8 ns/op
251BenchmarkBaselineMethodCallDirect1Arg 20000000 106 ns/op
252BenchmarkBaselineMethodCallDirect1Int 20000000 85.2 ns/op
253BenchmarkBaselineMethodCallDirect5Args 5000000 368 ns/op
254BenchmarkBaselineMethodCallDirect5Ints 10000000 233 ns/op
255BenchmarkBaselineMethodCallIndirect 100000000 18.0 ns/op
256BenchmarkBaselineMethodCallIndirect1Arg 50000000 42.0 ns/op
257BenchmarkBaselineMethodCallIndirect1Int 100000000 19.5 ns/op
258BenchmarkBaselineMethodCallIndirect5Args 5000000 309 ns/op
259BenchmarkBaselineMethodCallIndirect5Ints 10000000 168 ns/op
260BenchmarkBaselineTypeAssertion 10000000 218 ns/op
261BenchmarkBaselineTypeAssertionEmptyInterface 20000000 106 ns/op
262BenchmarkBaselineTypeAssertionInterface1 5000000 576 ns/op
263BenchmarkBaselineTypeAssertionInterface2 5000000 579 ns/op
264BenchmarkBaselineTypeReflectPrimitiveToValue 5000000 425 ns/op
265BenchmarkBaselineTypeReflectSliceToValue 1000000 3218 ns/op
266BenchmarkBaselineTypeReflectStructToValue 500000 4760 ns/op
267BenchmarkBaselineTypeCheck 10000000 189 ns/op
268BenchmarkBaselineTypeCheckEmptyInterface 20000000 93.1 ns/op
269BenchmarkBaselineTypeCheckInterface1 5000000 511 ns/op
270BenchmarkBaselineTypeCheckInterface2 5000000 516 ns/op
271BenchmarkBaselineTypeSwitchOneCase 10000000 262 ns/op
272BenchmarkBaselineTypeSwitchBasicTypesCase 10000000 295 ns/op
273BenchmarkBaselineTypeSwitchEmptyInterface 10000000 163 ns/op
274BenchmarkBaselineTypeSwitchInterface1 5000000 588 ns/op
275BenchmarkBaselineTypeSwitchInterface2 5000000 602 ns/op
276BenchmarkBaselineNewStructureLiteral 20000000 84.0 ns/op
277BenchmarkBaselineNewStructure 20000000 127 ns/op
278BenchmarkBaselineNewSliceLiteral 50000000 54.2 ns/op
279BenchmarkBaselineNewSlice 1000000 3124 ns/op
280BenchmarkBaselineNewMapLiteralIntToInt 500000 9083 ns/op
281BenchmarkBaselineNewMapLiteralIntToInterface 500000 9807 ns/op
282BenchmarkBaselineNewMapLiteralStringToInt 500000 9792 ns/op
283BenchmarkBaselineNewMapLiteralStringToInterface 500000 10595 ns/op
284BenchmarkBaselineNewMapLiteralIntToInt2Item 200000 14265 ns/op
285BenchmarkBaselineNewMapLiteralIntToInterface2Item 200000 14669 ns/op
286BenchmarkBaselineNewMapLiteralStringToInt2Item 200000 14025 ns/op
287BenchmarkBaselineNewMapLiteralStringToInterface2Item 200000 15086 ns/op
288BenchmarkBaselineNewMapIntToInt 500000 9025 ns/op
289BenchmarkBaselineNewMapIntToInterface 500000 9753 ns/op
290BenchmarkBaselineNewMapStringToInt 500000 9740 ns/op
291BenchmarkBaselineNewMapStringToInterface 500000 10486 ns/op
292BenchmarkBaselineSliceCopy 5000000 300 ns/op
293BenchmarkBaselineNewSliceAppendElement1 1000000 3318 ns/op
294BenchmarkBaselineNewSliceAppendElement10 1000000 5174 ns/op
295ok github.com/feyeleanor/gospeed 417.296s
296```
297
298_-- anthony starks_
299
Burcu Dogan11516f72015-12-09 18:20:59 -0800300
301## Raspberry Pi 2
302
Hilmar Lapp2b1d5312016-01-14 19:26:38 -0500303* [Building Go 1.5 on the Raspberry Pi - Dave Cheney](http://dave.cheney.net/2015/09/04/building-go-1-5-on-the-raspberry-pi)
304
Burcu Dogan11516f72015-12-09 18:20:59 -0800305```
306go version
307go version devel +07f9c25 Wed Dec 9 21:25:05 2015 +0000 linux/arm
308
309$ go test -timeout 20m -v -bench=Benchmark -run=X
310PASS
311BenchmarkAppend-4 3000000 402 ns/op
312BenchmarkAppendGrowByte-4 50 27296836 ns/op
313BenchmarkAppendGrowString-4 1 1277592542 ns/op
314BenchmarkAppend1Byte-4 20000000 75.6 ns/op
315BenchmarkAppend4Bytes-4 20000000 88.2 ns/op
316BenchmarkAppend7Bytes-4 20000000 103 ns/op
317BenchmarkAppend8Bytes-4 20000000 89.1 ns/op
318BenchmarkAppend15Bytes-4 20000000 109 ns/op
319BenchmarkAppend16Bytes-4 20000000 94.5 ns/op
320BenchmarkAppend32Bytes-4 20000000 91.4 ns/op
321BenchmarkAppendStr1Byte-4 20000000 73.9 ns/op
322BenchmarkAppendStr4Bytes-4 20000000 84.7 ns/op
323BenchmarkAppendStr8Bytes-4 20000000 88.7 ns/op
324BenchmarkAppendStr16Bytes-4 20000000 94.5 ns/op
325BenchmarkAppendStr32Bytes-4 20000000 91.3 ns/op
326BenchmarkAppendSpecialCase-4 2000000 675 ns/op
327BenchmarkCopy1Byte-4 20000000 109 ns/op 9.13 MB/s
328BenchmarkCopy2Byte-4 20000000 112 ns/op 17.77 MB/s
329BenchmarkCopy4Byte-4 10000000 120 ns/op 33.26 MB/s
330BenchmarkCopy8Byte-4 10000000 122 ns/op 65.32 MB/s
331BenchmarkCopy12Byte-4 10000000 126 ns/op 94.82 MB/s
332BenchmarkCopy16Byte-4 10000000 129 ns/op 123.60 MB/s
333BenchmarkCopy32Byte-4 10000000 126 ns/op 252.60 MB/s
334BenchmarkCopy128Byte-4 10000000 162 ns/op 786.76 MB/s
335BenchmarkCopy1024Byte-4 3000000 479 ns/op 2134.17 MB/s
336BenchmarkCopy1String-4 20000000 100 ns/op 9.98 MB/s
337BenchmarkCopy2String-4 20000000 104 ns/op 19.19 MB/s
338BenchmarkCopy4String-4 20000000 111 ns/op 35.86 MB/s
339BenchmarkCopy8String-4 20000000 114 ns/op 70.02 MB/s
340BenchmarkCopy12String-4 20000000 116 ns/op 103.17 MB/s
341BenchmarkCopy16String-4 10000000 120 ns/op 132.69 MB/s
342BenchmarkCopy32String-4 20000000 116 ns/op 273.77 MB/s
343BenchmarkCopy128String-4 10000000 150 ns/op 851.31 MB/s
344BenchmarkCopy1024String-4 3000000 472 ns/op 2167.03 MB/s
345BenchmarkChanNonblocking-4 20000000 77.7 ns/op
346BenchmarkSelectUncontended-4 2000000 780 ns/op
347BenchmarkSelectSyncContended-4 100000 15094 ns/op
348BenchmarkSelectAsyncContended-4 500000 2569 ns/op
349BenchmarkSelectNonblock-4 10000000 226 ns/op
350BenchmarkChanUncontended-4 50000 26993 ns/op
351BenchmarkChanContended-4 10000 111382 ns/op
352BenchmarkChanSync-4 300000 3994 ns/op
353BenchmarkChanProdCons0-4 500000 3100 ns/op
354BenchmarkChanProdCons10-4 1000000 2099 ns/op
355BenchmarkChanProdCons100-4 1000000 1342 ns/op
356BenchmarkChanProdConsWork0-4 500000 3071 ns/op
357BenchmarkChanProdConsWork10-4 500000 2332 ns/op
358BenchmarkChanProdConsWork100-4 1000000 1382 ns/op
359BenchmarkSelectProdCons-4 300000 5015 ns/op
360BenchmarkChanCreation-4 2000000 629 ns/op
361BenchmarkChanSem-4 1000000 1116 ns/op
362BenchmarkChanPopular-4 200 7597153 ns/op
363BenchmarkCallClosure-4 30000000 43.5 ns/op
364BenchmarkCallClosure1-4 30000000 49.0 ns/op
365BenchmarkCallClosure2-4 5000000 323 ns/op
366BenchmarkCallClosure3-4 5000000 318 ns/op
367BenchmarkCallClosure4-4 5000000 324 ns/op
368BenchmarkComplex128DivNormal-4 3000000 488 ns/op
369BenchmarkComplex128DivNisNaN-4 5000000 375 ns/op
370BenchmarkComplex128DivDisNaN-4 5000000 362 ns/op
371BenchmarkComplex128DivNisInf-4 5000000 289 ns/op
372BenchmarkComplex128DivDisInf-4 5000000 273 ns/op
373BenchmarkSetTypePtr-4 20000000 85.1 ns/op 46.98 MB/s
374BenchmarkSetTypePtr8-4 10000000 169 ns/op 189.14 MB/s
375BenchmarkSetTypePtr16-4 10000000 213 ns/op 299.83 MB/s
376BenchmarkSetTypePtr32-4 5000000 297 ns/op 429.62 MB/s
377BenchmarkSetTypePtr64-4 3000000 462 ns/op 553.72 MB/s
378BenchmarkSetTypePtr126-4 2000000 791 ns/op 636.59 MB/s
379BenchmarkSetTypePtr128-4 2000000 777 ns/op 658.60 MB/s
380BenchmarkSetTypePtrSlice-4 200000 6208 ns/op 659.75 MB/s
381BenchmarkSetTypeNode1-4 10000000 160 ns/op 74.86 MB/s
382BenchmarkSetTypeNode1Slice-4 1000000 1076 ns/op 356.60 MB/s
383BenchmarkSetTypeNode8-4 10000000 221 ns/op 180.94 MB/s
384BenchmarkSetTypeNode8Slice-4 1000000 2359 ns/op 542.53 MB/s
385BenchmarkSetTypeNode64-4 3000000 506 ns/op 521.63 MB/s
386BenchmarkSetTypeNode64Slice-4 100000 12992 ns/op 650.22 MB/s
387BenchmarkSetTypeNode64Dead-4 5000000 308 ns/op 856.90 MB/s
388BenchmarkSetTypeNode64DeadSlice-4 200000 11506 ns/op 734.21 MB/s
389BenchmarkSetTypeNode124-4 2000000 799 ns/op 630.27 MB/s
390BenchmarkSetTypeNode124Slice-4 100000 23306 ns/op 692.00 MB/s
391BenchmarkSetTypeNode126-4 2000000 776 ns/op 659.33 MB/s
392BenchmarkSetTypeNode126Slice-4 100000 21520 ns/op 761.31 MB/s
393BenchmarkSetTypeNode128-4 2000000 850 ns/op 611.35 MB/s
394BenchmarkSetTypeNode128Slice-4 50000 24122 ns/op 689.81 MB/s
395BenchmarkSetTypeNode130-4 2000000 827 ns/op 638.06 MB/s
396BenchmarkSetTypeNode130Slice-4 50000 24322 ns/op 694.67 MB/s
397BenchmarkSetTypeNode1024-4 300000 5655 ns/op 725.66 MB/s
398BenchmarkSetTypeNode1024Slice-4 10000 183602 ns/op 715.28 MB/s
399BenchmarkAllocation-4 10000 166825 ns/op
400BenchmarkHash5-4 10000000 217 ns/op 23.02 MB/s
401BenchmarkHash16-4 5000000 289 ns/op 55.18 MB/s
402BenchmarkHash64-4 2000000 770 ns/op 83.10 MB/s
403BenchmarkHash1024-4 200000 9442 ns/op 108.44 MB/s
404BenchmarkHash65536-4 2000 600452 ns/op 109.14 MB/s
405BenchmarkEqEfaceConcrete-4 20000000 79.1 ns/op
406BenchmarkEqIfaceConcrete-4 20000000 77.0 ns/op
407BenchmarkNeEfaceConcrete-4 20000000 80.0 ns/op
408BenchmarkNeIfaceConcrete-4 20000000 77.7 ns/op
409BenchmarkConvT2ESmall-4 5000000 362 ns/op
410BenchmarkConvT2EUintptr-4 5000000 394 ns/op
411BenchmarkConvT2ELarge-4 3000000 457 ns/op
412BenchmarkConvT2ISmall-4 3000000 482 ns/op
413BenchmarkConvT2IUintptr-4 3000000 524 ns/op
414BenchmarkConvT2ILarge-4 3000000 600 ns/op
415BenchmarkConvI2E-4 20000000 60.5 ns/op
416BenchmarkConvI2I-4 5000000 302 ns/op
417BenchmarkAssertE2T-4 10000000 121 ns/op
418BenchmarkAssertE2TLarge-4 10000000 131 ns/op
419BenchmarkAssertE2I-4 5000000 329 ns/op
420BenchmarkAssertI2T-4 10000000 125 ns/op
421BenchmarkAssertI2I-4 5000000 328 ns/op
422BenchmarkAssertI2E-4 20000000 84.6 ns/op
423BenchmarkAssertE2E-4 50000000 32.5 ns/op
424BenchmarkAssertE2T2-4 10000000 129 ns/op
425BenchmarkAssertE2T2Blank-4 100000000 18.0 ns/op
426BenchmarkAssertI2E2-4 20000000 91.2 ns/op
427BenchmarkAssertI2E2Blank-4 100000000 16.7 ns/op
428BenchmarkAssertE2E2-4 10000000 159 ns/op
429BenchmarkAssertE2E2Blank-4 100000000 16.8 ns/op
430BenchmarkMalloc8-4 5000000 317 ns/op
431BenchmarkMalloc16-4 3000000 485 ns/op
432BenchmarkMallocTypeInfo8-4 3000000 587 ns/op
433BenchmarkMallocTypeInfo16-4 2000000 661 ns/op
434BenchmarkMallocLargeStruct-4 500000 3205 ns/op
435BenchmarkGoroutineSelect-4 100 18605318 ns/op
436BenchmarkGoroutineBlocking-4 100 17222169 ns/op
437BenchmarkGoroutineForRange-4 100 19092854 ns/op
438BenchmarkGoroutineIdle-4 100 12554944 ns/op
439BenchmarkMapPop100-4 5000 270721 ns/op
440BenchmarkMapPop1000-4 300 4674884 ns/op
441BenchmarkMapPop10000-4 10 110070793 ns/op
442BenchmarkHashStringSpeed-4 3000000 400 ns/op
443BenchmarkHashBytesSpeed-4 2000000 709 ns/op
444BenchmarkHashInt32Speed-4 5000000 305 ns/op
445BenchmarkHashInt64Speed-4 5000000 349 ns/op
446BenchmarkHashStringArraySpeed-4 2000000 911 ns/op
447BenchmarkMegMap-4 5000000 367 ns/op
448BenchmarkMegOneMap-4 5000000 311 ns/op
449BenchmarkMegEqMap-4 100 10147332 ns/op
450BenchmarkMegEmptyMap-4 10000000 138 ns/op
451BenchmarkSmallStrMap-4 5000000 367 ns/op
452BenchmarkMapStringKeysEight_16-4 5000000 395 ns/op
453BenchmarkMapStringKeysEight_32-4 5000000 378 ns/op
454BenchmarkMapStringKeysEight_64-4 5000000 378 ns/op
455BenchmarkMapStringKeysEight_1M-4 5000000 376 ns/op
456BenchmarkIntMap-4 10000000 198 ns/op
457BenchmarkRepeatedLookupStrMapKey32-4 2000000 799 ns/op
458BenchmarkRepeatedLookupStrMapKey1M-4 100 10023558 ns/op
459BenchmarkNewEmptyMap-4 2000000 841 ns/op 0 B/op 0 allocs/op
460BenchmarkNewSmallMap-4 1000000 2357 ns/op 0 B/op 0 allocs/op
461BenchmarkMapIter-4 1000000 2132 ns/op
462BenchmarkMapIterEmpty-4 20000000 107 ns/op
463BenchmarkSameLengthMap-4 20000000 111 ns/op
464BenchmarkBigKeyMap-4 2000000 727 ns/op
465BenchmarkBigValMap-4 2000000 754 ns/op
466BenchmarkSmallKeyMap-4 5000000 296 ns/op
467BenchmarkComplexAlgMap-4 1000000 1786 ns/op
468BenchmarkMemmove0-4 30000000 47.7 ns/op
469BenchmarkMemmove1-4 30000000 50.2 ns/op 19.93 MB/s
470BenchmarkMemmove2-4 30000000 53.7 ns/op 37.28 MB/s
471BenchmarkMemmove3-4 30000000 56.9 ns/op 52.76 MB/s
472BenchmarkMemmove4-4 20000000 61.1 ns/op 65.42 MB/s
473BenchmarkMemmove5-4 20000000 75.8 ns/op 65.95 MB/s
474BenchmarkMemmove6-4 20000000 79.2 ns/op 75.80 MB/s
475BenchmarkMemmove7-4 20000000 82.5 ns/op 84.84 MB/s
476BenchmarkMemmove8-4 20000000 64.8 ns/op 123.37 MB/s
477BenchmarkMemmove9-4 20000000 67.1 ns/op 134.16 MB/s
478BenchmarkMemmove10-4 20000000 76.4 ns/op 130.87 MB/s
479BenchmarkMemmove11-4 20000000 81.3 ns/op 135.30 MB/s
480BenchmarkMemmove12-4 20000000 66.8 ns/op 179.68 MB/s
481BenchmarkMemmove13-4 20000000 70.6 ns/op 184.23 MB/s
482BenchmarkMemmove14-4 20000000 75.2 ns/op 186.19 MB/s
483BenchmarkMemmove15-4 20000000 79.5 ns/op 188.74 MB/s
484BenchmarkMemmove16-4 20000000 71.8 ns/op 222.73 MB/s
485BenchmarkMemmove32-4 20000000 68.3 ns/op 468.52 MB/s
486BenchmarkMemmove64-4 20000000 79.2 ns/op 808.35 MB/s
487BenchmarkMemmove128-4 20000000 101 ns/op 1256.13 MB/s
488BenchmarkMemmove256-4 10000000 145 ns/op 1755.64 MB/s
489BenchmarkMemmove512-4 5000000 244 ns/op 2095.34 MB/s
490BenchmarkMemmove1024-4 3000000 475 ns/op 2153.54 MB/s
491BenchmarkMemmove2048-4 2000000 883 ns/op 2317.95 MB/s
492BenchmarkMemmove4096-4 1000000 1809 ns/op 2262.99 MB/s
493BenchmarkMemmoveUnaligned0-4 30000000 58.1 ns/op
494BenchmarkMemmoveUnaligned1-4 20000000 63.3 ns/op 15.81 MB/s
495BenchmarkMemmoveUnaligned2-4 20000000 66.6 ns/op 30.04 MB/s
496BenchmarkMemmoveUnaligned3-4 20000000 69.9 ns/op 42.89 MB/s
497BenchmarkMemmoveUnaligned4-4 20000000 95.6 ns/op 41.85 MB/s
498BenchmarkMemmoveUnaligned5-4 20000000 98.6 ns/op 50.73 MB/s
499BenchmarkMemmoveUnaligned6-4 20000000 99.9 ns/op 60.08 MB/s
500BenchmarkMemmoveUnaligned7-4 20000000 101 ns/op 68.77 MB/s
501BenchmarkMemmoveUnaligned8-4 20000000 108 ns/op 73.58 MB/s
502BenchmarkMemmoveUnaligned9-4 20000000 112 ns/op 79.90 MB/s
503BenchmarkMemmoveUnaligned10-4 10000000 126 ns/op 79.18 MB/s
504BenchmarkMemmoveUnaligned11-4 10000000 128 ns/op 85.32 MB/s
505BenchmarkMemmoveUnaligned12-4 10000000 132 ns/op 90.67 MB/s
506BenchmarkMemmoveUnaligned13-4 10000000 125 ns/op 103.51 MB/s
507BenchmarkMemmoveUnaligned14-4 10000000 132 ns/op 105.50 MB/s
508BenchmarkMemmoveUnaligned15-4 10000000 138 ns/op 108.38 MB/s
509BenchmarkMemmoveUnaligned16-4 10000000 141 ns/op 112.89 MB/s
510BenchmarkMemmoveUnaligned32-4 10000000 154 ns/op 207.69 MB/s
511BenchmarkMemmoveUnaligned64-4 10000000 211 ns/op 303.20 MB/s
512BenchmarkMemmoveUnaligned128-4 5000000 318 ns/op 401.47 MB/s
513BenchmarkMemmoveUnaligned256-4 3000000 436 ns/op 586.76 MB/s
514BenchmarkMemmoveUnaligned512-4 2000000 722 ns/op 708.50 MB/s
515BenchmarkMemmoveUnaligned1024-4 1000000 1296 ns/op 789.56 MB/s
516BenchmarkMemmoveUnaligned2048-4 500000 2576 ns/op 794.83 MB/s
517BenchmarkMemmoveUnaligned4096-4 300000 4999 ns/op 819.32 MB/s
518BenchmarkMemclr5-4 20000000 77.1 ns/op 64.82 MB/s
519BenchmarkMemclr16-4 20000000 96.3 ns/op 166.15 MB/s
520BenchmarkMemclr64-4 20000000 85.0 ns/op 753.23 MB/s
521BenchmarkMemclr256-4 10000000 125 ns/op 2040.75 MB/s
522BenchmarkMemclr4096-4 1000000 1662 ns/op 2464.13 MB/s
523BenchmarkMemclr65536-4 30000 50428 ns/op 1299.58 MB/s
524BenchmarkMemclr1M-4 2000 875472 ns/op 1197.73 MB/s
525BenchmarkMemclr4M-4 500 3529939 ns/op 1188.21 MB/s
526BenchmarkMemclr8M-4 200 7088731 ns/op 1183.37 MB/s
527BenchmarkMemclr16M-4 100 14275180 ns/op 1175.27 MB/s
528BenchmarkMemclr64M-4 20 59343321 ns/op 1130.86 MB/s
529BenchmarkGoMemclr5-4 20000000 61.4 ns/op 81.44 MB/s
530BenchmarkGoMemclr16-4 20000000 81.7 ns/op 195.78 MB/s
531BenchmarkGoMemclr64-4 20000000 69.8 ns/op 917.14 MB/s
532BenchmarkGoMemclr256-4 20000000 109 ns/op 2339.84 MB/s
533BenchmarkClearFat8-4 200000000 7.84 ns/op
534BenchmarkClearFat12-4 200000000 8.93 ns/op
535BenchmarkClearFat16-4 100000000 10.1 ns/op
536BenchmarkClearFat24-4 100000000 12.3 ns/op
537BenchmarkClearFat32-4 100000000 14.5 ns/op
538BenchmarkClearFat40-4 30000000 52.4 ns/op
539BenchmarkClearFat48-4 20000000 60.3 ns/op
540BenchmarkClearFat56-4 20000000 65.9 ns/op
541BenchmarkClearFat64-4 20000000 73.8 ns/op
542BenchmarkClearFat128-4 10000000 126 ns/op
543BenchmarkClearFat256-4 10000000 234 ns/op
544BenchmarkClearFat512-4 3000000 448 ns/op
545BenchmarkClearFat1024-4 2000000 872 ns/op
546BenchmarkCopyFat8-4 200000000 6.72 ns/op
547BenchmarkCopyFat12-4 200000000 7.80 ns/op
548BenchmarkCopyFat16-4 200000000 8.93 ns/op
549BenchmarkCopyFat24-4 100000000 11.2 ns/op
550BenchmarkCopyFat32-4 100000000 17.9 ns/op
551BenchmarkCopyFat64-4 20000000 75.0 ns/op
552BenchmarkCopyFat128-4 10000000 128 ns/op
553BenchmarkCopyFat256-4 10000000 236 ns/op
554BenchmarkCopyFat512-4 3000000 449 ns/op
555BenchmarkCopyFat1024-4 2000000 879 ns/op
556BenchmarkFinalizer-4 500 3830391 ns/op
557BenchmarkFinalizerRun-4 200000 6697 ns/op
558BenchmarkSyscall-4 5000000 296 ns/op
559BenchmarkSyscallWork-4 3000000 551 ns/op
560BenchmarkSyscallExcess-4 5000000 296 ns/op
561BenchmarkSyscallExcessWork-4 3000000 552 ns/op
562BenchmarkPingPongHog-4 100000 13315 ns/op
563BenchmarkStackGrowth-4 500000 2461 ns/op
564BenchmarkStackGrowthDeep-4 2000 1028254 ns/op
565BenchmarkCreateGoroutines-4 500000 2722 ns/op
566BenchmarkCreateGoroutinesParallel-4 2000000 649 ns/op
567BenchmarkCreateGoroutinesCapture-4 100000 21739 ns/op 16 B/op 1 allocs/op
568BenchmarkClosureCall-4 30000000 48.0 ns/op
569BenchmarkMatmult-4 50000000 40.3 ns/op
570BenchmarkIfaceCmp100-4 500000 2369 ns/op
571BenchmarkIfaceCmpNil100-4 500000 2475 ns/op
572BenchmarkDefer-4 1000000 1203 ns/op
573BenchmarkDefer10-4 1000000 1089 ns/op
574BenchmarkDeferMany-4 1000000 2045 ns/op
575BenchmarkStackCopy-4 1 2767373639 ns/op
576BenchmarkCompareStringEqual-4 10000000 140 ns/op
577BenchmarkCompareStringIdentical-4 30000000 41.4 ns/op
578BenchmarkCompareStringSameLength-4 20000000 92.0 ns/op
579BenchmarkCompareStringDifferentLength-4 100000000 13.4 ns/op
580BenchmarkCompareStringBigUnaligned-4 100 11917034 ns/op 87.99 MB/s
581BenchmarkCompareStringBig-4 200 10163432 ns/op 103.17 MB/s
582BenchmarkRuneIterate-4 500000 3969 ns/op
583BenchmarkRuneIterate2-4 500000 3947 ns/op
584BenchmarkUint32Div7-4 20000000 102 ns/op
585BenchmarkUint32Div37-4 20000000 102 ns/op
586BenchmarkUint32Div123-4 20000000 102 ns/op
587BenchmarkUint32Div763-4 20000000 102 ns/op
588BenchmarkUint32Div1247-4 20000000 102 ns/op
589BenchmarkUint32Div9305-4 20000000 102 ns/op
590BenchmarkUint32Div13307-4 20000000 102 ns/op
591BenchmarkUint32Div52513-4 20000000 103 ns/op
592BenchmarkUint32Div60978747-4 20000000 98.7 ns/op
593BenchmarkUint32Div106956295-4 20000000 100.0 ns/op
594BenchmarkUint32Mod7-4 20000000 102 ns/op
595BenchmarkUint32Mod37-4 20000000 102 ns/op
596BenchmarkUint32Mod123-4 20000000 102 ns/op
597BenchmarkUint32Mod763-4 20000000 103 ns/op
598BenchmarkUint32Mod1247-4 20000000 103 ns/op
599BenchmarkUint32Mod9305-4 20000000 102 ns/op
600BenchmarkUint32Mod13307-4 20000000 102 ns/op
601BenchmarkUint32Mod52513-4 20000000 103 ns/op
602BenchmarkUint32Mod60978747-4 20000000 100 ns/op
603BenchmarkUint32Mod106956295-4 20000000 100 ns/op
604ok runtime 562.289s
605```
606
Burcu Dogan894f5172015-12-06 18:47:54 -0800607## Raspberry Pi Zero
608
609Architecture: 1 GHz ARM1176JZF-S, running at 700Mhz; 512MB RAM
610
611Operating System: Raspbian Jessie
612
613```
614$ go version
615go version devel +5c24832 Sat Dec 5 00:10:40 2015 +0000 linux/arm
616
617$ go test -timeout 20m -v -bench=Benchmark -run=X
618PASS
619BenchmarkAppend 3000000 518 ns/op
620BenchmarkAppendGrowByte 20 95720661 ns/op
621BenchmarkAppendGrowString 1 2232033275 ns/op
622BenchmarkAppend1Byte 20000000 99.0 ns/op
623BenchmarkAppend4Bytes 10000000 120 ns/op
624BenchmarkAppend7Bytes 10000000 155 ns/op
625BenchmarkAppend8Bytes 10000000 132 ns/op
626BenchmarkAppend15Bytes 10000000 162 ns/op
627BenchmarkAppend16Bytes 10000000 134 ns/op
628BenchmarkAppend32Bytes 10000000 121 ns/op
629BenchmarkAppendStr1Byte 20000000 97.0 ns/op
630BenchmarkAppendStr4Bytes 10000000 118 ns/op
631BenchmarkAppendStr8Bytes 10000000 129 ns/op
632BenchmarkAppendStr16Bytes 10000000 132 ns/op
633BenchmarkAppendStr32Bytes 10000000 121 ns/op
634BenchmarkAppendSpecialCase 2000000 791 ns/op
635BenchmarkCopy1Byte 10000000 132 ns/op 7.54 MB/s
636BenchmarkCopy2Byte 10000000 144 ns/op 13.81 MB/s
637BenchmarkCopy4Byte 10000000 153 ns/op 26.12 MB/s
638BenchmarkCopy8Byte 10000000 164 ns/op 48.51 MB/s
639BenchmarkCopy12Byte 10000000 162 ns/op 74.03 MB/s
640BenchmarkCopy16Byte 10000000 167 ns/op 95.63 MB/s
641BenchmarkCopy32Byte 10000000 155 ns/op 205.20 MB/s
642BenchmarkCopy128Byte 10000000 192 ns/op 664.06 MB/s
643BenchmarkCopy1024Byte 2000000 689 ns/op 1484.28 MB/s
644BenchmarkCopy1String 10000000 120 ns/op 8.27 MB/s
645BenchmarkCopy2String 10000000 134 ns/op 14.85 MB/s
646BenchmarkCopy4String 10000000 142 ns/op 28.01 MB/s
647BenchmarkCopy8String 10000000 154 ns/op 51.81 MB/s
648BenchmarkCopy12String 10000000 151 ns/op 79.01 MB/s
649BenchmarkCopy16String 10000000 157 ns/op 101.82 MB/s
650BenchmarkCopy32String 10000000 145 ns/op 219.52 MB/s
651BenchmarkCopy128String 10000000 182 ns/op 700.88 MB/s
652BenchmarkCopy1024String 2000000 976 ns/op 1048.87 MB/s
653BenchmarkChanNonblocking 5000000 246 ns/op
654BenchmarkSelectUncontended 500000 3610 ns/op
655BenchmarkSelectSyncContended 100000 18957 ns/op
656BenchmarkSelectAsyncContended 500000 3614 ns/op
657BenchmarkSelectNonblock 2000000 814 ns/op
658BenchmarkChanUncontended 10000 135820 ns/op
659BenchmarkChanContended 10000 133122 ns/op
660BenchmarkChanSync 200000 5870 ns/op
661BenchmarkChanProdCons0 200000 5899 ns/op
662BenchmarkChanProdCons10 500000 2138 ns/op
663BenchmarkChanProdCons100 1000000 1557 ns/op
664BenchmarkChanProdConsWork0 200000 8948 ns/op
665BenchmarkChanProdConsWork10 300000 5043 ns/op
666BenchmarkChanProdConsWork100 300000 4498 ns/op
667BenchmarkSelectProdCons 200000 10818 ns/op
668BenchmarkChanCreation 500000 3187 ns/op
669BenchmarkChanSem 1000000 1266 ns/op
670BenchmarkChanPopular 100 14315946 ns/op
671BenchmarkCallClosure 30000000 50.0 ns/op
672BenchmarkCallClosure1 30000000 56.3 ns/op
673BenchmarkCallClosure2 3000000 512 ns/op
674BenchmarkCallClosure3 3000000 503 ns/op
675BenchmarkCallClosure4 3000000 512 ns/op
676BenchmarkComplex128DivNormal 2000000 735 ns/op
677BenchmarkComplex128DivNisNaN 200000 6001 ns/op
678BenchmarkComplex128DivDisNaN 200000 5992 ns/op
679BenchmarkComplex128DivNisInf 5000000 390 ns/op
680BenchmarkComplex128DivDisInf 5000000 375 ns/op
681BenchmarkSetTypePtr 10000000 119 ns/op 33.43 MB/s
682BenchmarkSetTypePtr8 10000000 227 ns/op 140.89 MB/s
683BenchmarkSetTypePtr16 5000000 285 ns/op 224.30 MB/s
684BenchmarkSetTypePtr32 5000000 388 ns/op 329.65 MB/s
685BenchmarkSetTypePtr64 3000000 591 ns/op 432.77 MB/s
686BenchmarkSetTypePtr126 1000000 1021 ns/op 493.46 MB/s
687BenchmarkSetTypePtr128 1000000 1003 ns/op 510.46 MB/s
688BenchmarkSetTypePtrSlice 200000 7427 ns/op 551.43 MB/s
689BenchmarkSetTypeNode1 10000000 217 ns/op 55.20 MB/s
690BenchmarkSetTypeNode1Slice 1000000 1284 ns/op 299.03 MB/s
691BenchmarkSetTypeNode8 5000000 277 ns/op 144.17 MB/s
692BenchmarkSetTypeNode8Slice 500000 2825 ns/op 453.02 MB/s
693BenchmarkSetTypeNode64 2000000 661 ns/op 398.89 MB/s
694BenchmarkSetTypeNode64Slice 100000 15531 ns/op 543.92 MB/s
695BenchmarkSetTypeNode64Dead 5000000 382 ns/op 689.66 MB/s
696BenchmarkSetTypeNode64DeadSlice 100000 13252 ns/op 637.46 MB/s
697BenchmarkSetTypeNode124 1000000 1017 ns/op 495.27 MB/s
698BenchmarkSetTypeNode124Slice 50000 28139 ns/op 573.14 MB/s
699BenchmarkSetTypeNode126 2000000 1001 ns/op 511.10 MB/s
700BenchmarkSetTypeNode126Slice 50000 26535 ns/op 617.43 MB/s
701BenchmarkSetTypeNode128 1000000 1087 ns/op 478.22 MB/s
702BenchmarkSetTypeNode128Slice 50000 29166 ns/op 570.52 MB/s
703BenchmarkSetTypeNode130 1000000 1067 ns/op 494.83 MB/s
704BenchmarkSetTypeNode130Slice 50000 29691 ns/op 569.04 MB/s
705BenchmarkSetTypeNode1024 200000 7155 ns/op 573.51 MB/s
706BenchmarkSetTypeNode1024Slice 5000 224292 ns/op 585.52 MB/s
707BenchmarkAllocation 2000 957094 ns/op
708BenchmarkHash5 5000000 349 ns/op 14.29 MB/s
709BenchmarkHash16 3000000 436 ns/op 36.66 MB/s
710BenchmarkHash64 1000000 1007 ns/op 63.49 MB/s
711BenchmarkHash1024 200000 11267 ns/op 90.88 MB/s
712BenchmarkHash65536 2000 797741 ns/op 82.15 MB/s
713BenchmarkEqEfaceConcrete 20000000 111 ns/op
714BenchmarkEqIfaceConcrete 20000000 106 ns/op
715BenchmarkNeEfaceConcrete 20000000 111 ns/op
716BenchmarkNeIfaceConcrete 20000000 106 ns/op
717BenchmarkConvT2ESmall 3000000 561 ns/op
718BenchmarkConvT2EUintptr 2000000 599 ns/op
719BenchmarkConvT2ELarge 2000000 767 ns/op
720BenchmarkConvT2ISmall 2000000 724 ns/op
721BenchmarkConvT2IUintptr 2000000 750 ns/op
722BenchmarkConvT2ILarge 2000000 907 ns/op
723BenchmarkConvI2E 20000000 76.7 ns/op
724BenchmarkConvI2I 3000000 425 ns/op
725BenchmarkAssertE2T 10000000 176 ns/op
726BenchmarkAssertE2TLarge 10000000 189 ns/op
727BenchmarkAssertE2I 3000000 455 ns/op
728BenchmarkAssertI2T 10000000 176 ns/op
729BenchmarkAssertI2I 3000000 451 ns/op
730BenchmarkAssertI2E 20000000 109 ns/op
731BenchmarkAssertE2E 30000000 40.7 ns/op
732BenchmarkAssertE2T2 10000000 180 ns/op
733BenchmarkAssertE2T2Blank 50000000 22.8 ns/op
734BenchmarkAssertI2E2 20000000 117 ns/op
735BenchmarkAssertI2E2Blank 100000000 21.7 ns/op
736BenchmarkAssertE2E2 10000000 231 ns/op
737BenchmarkAssertE2E2Blank 100000000 21.8 ns/op
738BenchmarkMalloc8 3000000 507 ns/op
739BenchmarkMalloc16 2000000 848 ns/op
740BenchmarkMallocTypeInfo8 2000000 1012 ns/op
741BenchmarkMallocTypeInfo16 1000000 1168 ns/op
742BenchmarkMallocLargeStruct 500000 4823 ns/op
743BenchmarkGoroutineSelect 20 76172338 ns/op
744BenchmarkGoroutineBlocking 20 63469806 ns/op
745BenchmarkGoroutineForRange 20 64107650 ns/op
746BenchmarkGoroutineIdle 20 60844381 ns/op
747BenchmarkMapPop100 3000 409498 ns/op
748BenchmarkMapPop1000 200 7783817 ns/op
749BenchmarkMapPop10000 10 170736704 ns/op
750BenchmarkHashStringSpeed 3000000 541 ns/op
751BenchmarkHashBytesSpeed 1000000 1157 ns/op
752BenchmarkHashInt32Speed 5000000 371 ns/op
753BenchmarkHashInt64Speed 3000000 427 ns/op
754BenchmarkHashStringArraySpeed 1000000 1417 ns/op
755BenchmarkMegMap 3000000 404 ns/op
756BenchmarkMegOneMap 5000000 346 ns/op
757BenchmarkMegEqMap 100 16663414 ns/op
758BenchmarkMegEmptyMap 10000000 160 ns/op
759BenchmarkSmallStrMap 3000000 415 ns/op
760BenchmarkMapStringKeysEight_16 3000000 417 ns/op
761BenchmarkMapStringKeysEight_32 3000000 420 ns/op
762BenchmarkMapStringKeysEight_64 3000000 420 ns/op
763BenchmarkMapStringKeysEight_1M 3000000 419 ns/op
764BenchmarkIntMap 10000000 220 ns/op
765BenchmarkRepeatedLookupStrMapKey32 1000000 1015 ns/op
766BenchmarkRepeatedLookupStrMapKey1M 100 15652033 ns/op
767BenchmarkNewEmptyMap 1000000 1395 ns/op 0 B/op 0 allocs/op
768BenchmarkNewSmallMap 300000 3368 ns/op 0 B/op 0 allocs/op
769BenchmarkMapIter 500000 2947 ns/op
770BenchmarkMapIterEmpty 20000000 163 ns/op
771BenchmarkSameLengthMap 10000000 133 ns/op
772BenchmarkBigKeyMap 2000000 899 ns/op
773BenchmarkBigValMap 2000000 922 ns/op
774BenchmarkSmallKeyMap 3000000 402 ns/op
775BenchmarkComplexAlgMap 1000000 2003 ns/op
776BenchmarkMemmove0 20000000 61.4 ns/op
777BenchmarkMemmove1 20000000 76.6 ns/op 13.05 MB/s
778BenchmarkMemmove2 20000000 86.3 ns/op 23.18 MB/s
779BenchmarkMemmove3 20000000 83.7 ns/op 35.83 MB/s
780BenchmarkMemmove4 20000000 88.0 ns/op 45.48 MB/s
781BenchmarkMemmove5 20000000 110 ns/op 45.37 MB/s
782BenchmarkMemmove6 20000000 115 ns/op 51.99 MB/s
783BenchmarkMemmove7 10000000 123 ns/op 56.89 MB/s
784BenchmarkMemmove8 20000000 99.5 ns/op 80.44 MB/s
785BenchmarkMemmove9 20000000 112 ns/op 79.76 MB/s
786BenchmarkMemmove10 10000000 125 ns/op 79.48 MB/s
787BenchmarkMemmove11 10000000 125 ns/op 87.84 MB/s
788BenchmarkMemmove12 20000000 96.9 ns/op 123.87 MB/s
789BenchmarkMemmove13 20000000 110 ns/op 117.83 MB/s
790BenchmarkMemmove14 10000000 123 ns/op 113.65 MB/s
791BenchmarkMemmove15 10000000 122 ns/op 122.30 MB/s
792BenchmarkMemmove16 20000000 101 ns/op 156.89 MB/s
793BenchmarkMemmove32 20000000 90.8 ns/op 352.44 MB/s
794BenchmarkMemmove64 20000000 108 ns/op 588.34 MB/s
795BenchmarkMemmove128 10000000 127 ns/op 1001.83 MB/s
796BenchmarkMemmove256 10000000 178 ns/op 1436.19 MB/s
797BenchmarkMemmove512 5000000 326 ns/op 1569.07 MB/s
798BenchmarkMemmove1024 2000000 631 ns/op 1620.84 MB/s
799BenchmarkMemmove2048 1000000 1251 ns/op 1636.60 MB/s
800BenchmarkMemmove4096 500000 2499 ns/op 1638.97 MB/s
801BenchmarkMemmoveUnaligned0 20000000 72.5 ns/op
802BenchmarkMemmoveUnaligned1 20000000 87.8 ns/op 11.39 MB/s
803BenchmarkMemmoveUnaligned2 20000000 99.4 ns/op 20.12 MB/s
804BenchmarkMemmoveUnaligned3 20000000 96.9 ns/op 30.96 MB/s
805BenchmarkMemmoveUnaligned4 10000000 135 ns/op 29.44 MB/s
806BenchmarkMemmoveUnaligned5 10000000 147 ns/op 33.90 MB/s
807BenchmarkMemmoveUnaligned6 10000000 146 ns/op 41.09 MB/s
808BenchmarkMemmoveUnaligned7 10000000 151 ns/op 46.27 MB/s
809BenchmarkMemmoveUnaligned8 10000000 156 ns/op 51.22 MB/s
810BenchmarkMemmoveUnaligned9 10000000 161 ns/op 55.82 MB/s
811BenchmarkMemmoveUnaligned10 10000000 166 ns/op 60.09 MB/s
812BenchmarkMemmoveUnaligned11 10000000 171 ns/op 64.17 MB/s
813BenchmarkMemmoveUnaligned12 10000000 177 ns/op 67.79 MB/s
814BenchmarkMemmoveUnaligned13 10000000 181 ns/op 71.60 MB/s
815BenchmarkMemmoveUnaligned14 10000000 189 ns/op 74.03 MB/s
816BenchmarkMemmoveUnaligned15 10000000 196 ns/op 76.30 MB/s
817BenchmarkMemmoveUnaligned16 10000000 200 ns/op 79.91 MB/s
818BenchmarkMemmoveUnaligned32 10000000 221 ns/op 144.64 MB/s
819BenchmarkMemmoveUnaligned64 5000000 290 ns/op 220.16 MB/s
820BenchmarkMemmoveUnaligned128 3000000 413 ns/op 309.84 MB/s
821BenchmarkMemmoveUnaligned256 2000000 766 ns/op 334.16 MB/s
822BenchmarkMemmoveUnaligned512 2000000 925 ns/op 553.13 MB/s
823BenchmarkMemmoveUnaligned1024 500000 2747 ns/op 372.66 MB/s
824BenchmarkMemmoveUnaligned2048 500000 3180 ns/op 643.85 MB/s
825BenchmarkMemmoveUnaligned4096 200000 6206 ns/op 659.99 MB/s
826BenchmarkMemclr5 20000000 105 ns/op 47.53 MB/s
827BenchmarkMemclr16 20000000 110 ns/op 144.77 MB/s
828BenchmarkMemclr64 10000000 125 ns/op 511.58 MB/s
829BenchmarkMemclr256 10000000 182 ns/op 1402.34 MB/s
830BenchmarkMemclr4096 500000 2489 ns/op 1645.22 MB/s
831BenchmarkMemclr65536 50000 39883 ns/op 1643.18 MB/s
832BenchmarkMemclr1M 2000 636812 ns/op 1646.60 MB/s
833BenchmarkMemclr4M 500 2549362 ns/op 1645.24 MB/s
834BenchmarkMemclr8M 300 5162451 ns/op 1624.93 MB/s
835BenchmarkMemclr16M 200 10300878 ns/op 1628.72 MB/s
836BenchmarkMemclr64M 30 42801198 ns/op 1567.92 MB/s
837BenchmarkGoMemclr5 20000000 73.5 ns/op 67.99 MB/s
838BenchmarkGoMemclr16 20000000 85.9 ns/op 186.24 MB/s
839BenchmarkGoMemclr64 20000000 87.8 ns/op 729.24 MB/s
840BenchmarkGoMemclr256 10000000 160 ns/op 1591.97 MB/s
841BenchmarkClearFat8 100000000 15.6 ns/op
842BenchmarkClearFat12 100000000 27.5 ns/op
843BenchmarkClearFat16 100000000 32.4 ns/op
844BenchmarkClearFat24 50000000 57.0 ns/op
845BenchmarkClearFat32 50000000 80.5 ns/op
846BenchmarkClearFat40 30000000 77.5 ns/op
847BenchmarkClearFat48 30000000 105 ns/op
848BenchmarkClearFat56 20000000 87.1 ns/op
849BenchmarkClearFat64 20000000 137 ns/op
850BenchmarkClearFat128 20000000 278 ns/op
851BenchmarkClearFat256 5000000 537 ns/op
852BenchmarkClearFat512 2000000 1293 ns/op
853BenchmarkClearFat1024 1000000 2545 ns/op
854BenchmarkCopyFat8 100000000 12.2 ns/op
855BenchmarkCopyFat12 100000000 20.3 ns/op
856BenchmarkCopyFat16 100000000 34.3 ns/op
857BenchmarkCopyFat24 50000000 27.7 ns/op
858BenchmarkCopyFat32 50000000 25.4 ns/op
859BenchmarkCopyFat64 20000000 135 ns/op
860BenchmarkCopyFat128 10000000 299 ns/op
861BenchmarkCopyFat256 2000000 571 ns/op
862BenchmarkCopyFat512 1000000 1218 ns/op
863BenchmarkCopyFat1024 500000 2665 ns/op
864BenchmarkFinalizer 50 20313669 ns/op
865BenchmarkFinalizerRun 30000 49987 ns/op
866BenchmarkSyscall 1000000 1625 ns/op
867BenchmarkSyscallWork 500000 2668 ns/op
868BenchmarkSyscallExcess 1000000 1613 ns/op
869BenchmarkSyscallExcessWork 500000 2658 ns/op
870BenchmarkPingPongHog 100000 20539 ns/op
871BenchmarkStackGrowth 50000 28473 ns/op
872BenchmarkStackGrowthDeep 500 2845263 ns/op
873BenchmarkCreateGoroutines 300000 4297 ns/op
874BenchmarkCreateGoroutinesParallel 300000 4300 ns/op
875BenchmarkCreateGoroutinesCapture 50000 33218 ns/op 16 B/op 1 allocs/op
876BenchmarkClosureCall 30000000 55.1 ns/op
877BenchmarkMatmult 10000000 196 ns/op
878BenchmarkIfaceCmp100 500000 2672 ns/op
879BenchmarkIfaceCmpNil100 500000 2982 ns/op
880BenchmarkDefer 1000000 1819 ns/op
881BenchmarkDefer10 1000000 1478 ns/op
882BenchmarkDeferMany 500000 3464 ns/op
883BenchmarkStackCopy 1 3714828065 ns/op
884BenchmarkCompareStringEqual 10000000 160 ns/op
885BenchmarkCompareStringIdentical 30000000 54.1 ns/op
886BenchmarkCompareStringSameLength 20000000 111 ns/op
887BenchmarkCompareStringDifferentLength 100000000 16.3 ns/op
888BenchmarkCompareStringBigUnaligned 100 16695582 ns/op 62.81 MB/s
889BenchmarkCompareStringBig 100 17208318 ns/op 60.93 MB/s
890BenchmarkRuneIterate 300000 5159 ns/op
891BenchmarkRuneIterate2 300000 5158 ns/op
892BenchmarkUint32Div7 10000000 144 ns/op
893BenchmarkUint32Div37 10000000 144 ns/op
894BenchmarkUint32Div123 10000000 144 ns/op
895BenchmarkUint32Div763 10000000 148 ns/op
896BenchmarkUint32Div1247 10000000 144 ns/op
897BenchmarkUint32Div9305 10000000 144 ns/op
898BenchmarkUint32Div13307 10000000 144 ns/op
899BenchmarkUint32Div52513 10000000 144 ns/op
900BenchmarkUint32Div60978747 10000000 131 ns/op
901BenchmarkUint32Div106956295 10000000 131 ns/op
902BenchmarkUint32Mod7 10000000 144 ns/op
903BenchmarkUint32Mod37 10000000 144 ns/op
904BenchmarkUint32Mod123 10000000 144 ns/op
905BenchmarkUint32Mod763 10000000 144 ns/op
906BenchmarkUint32Mod1247 10000000 144 ns/op
907BenchmarkUint32Mod9305 10000000 144 ns/op
908BenchmarkUint32Mod13307 10000000 144 ns/op
909BenchmarkUint32Mod52513 10000000 144 ns/op
910BenchmarkUint32Mod60978747 10000000 131 ns/op
911BenchmarkUint32Mod106956295 10000000 131 ns/op
912ok runtime 566.969s
913```
914
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100915## ODROID-X
916
917Architecture: ARMv7 quad-core Cortex-A9 (Samsung Exynos 4412 1.4GHz), 1GB RAM, Mali graphics (untested).
918
919Operating System: [Archlinux ARM](http://archlinuxarm.org/)
920
921Go pre-1.1 compiles out of the box. The four cores make it particularly suited to Go multi-threaded programs. An ODROID-X2 is coming (Nov 2012) with more RAM.
922
923_-- Rémy Oudompheng_
924
925## BananaPi
926
927[BananaPi](http://bananapi.org) has a few enhanced hardware components compare with Raspberry Pi.
928
929| **Architecture** | **Comments** |
930|:-----------------|:-------------|
931| [Allwinner A20(ARM Cortex-A7 Dual-core, 1GHz, Mali400MP2 GPU)](http://www.allwinnertech.com/en/clq/processora/A20.html) | tbc |
932| eSATA | No worry to wear out your root SD Card|
933| Onboard Microphone | tbc |
934| 1G Etherenet | tbc |
935| 1G RAM | tbc |
936| Reset Switch | To reset the board ?|
937| Power Switch | To power cycle the board ?|
938
939```
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100940root@bpi01:/data/go13/src# cat ./buildgo.bash
941#!/bin/bash
942# use 1 CPU to avoid out of memory compilation issue.
943time taskset 2 ./make.bash
944
945root@bpi01:/data/go13/src# ./buildgo.bash
946
947<snipped>
948
949Installed Go for linux/arm in /data/go1.3
950Installed commands in /data/go1.3/bin
951
952real 9m9.222s
953user 8m18.960s
954sys 0m40.920s
955root@bpi01:/data/go1.3/src#
956```
957
958_--T.J. Yang_
959
960## AppliedMicro X-Gene (ARMv8)
961
962Architecture: ARMv8 (64-bit) 8-core, 2.4GHz, 16GB RAM
963
Itaru Kitayamafa6e1042015-08-04 10:50:04 +0900964Operating Systems: Linux, Fedora 21
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100965
Aram Hăvărneanua9c4b042015-03-25 14:53:56 +0100966You will need to cross-compile a toolchain using bootstrap.bash. After you copy it to the arm64 system and set `GOROOT_BOOTSTRAP`, you can build go natively.
Andrew Cenciniaa3ff6f2015-07-15 18:12:48 -0400967
968## 96Boards HiKey (ARMv8)
969
970Architecture: ARMv8 (64-bit) 8-core, 1.2GHz, 1GB RAM
971
972Operating System: Linux (Linaro)
973
974Go Version: 1.5Beta1
975
976Special Notes: Enable a swap partition (<=1GB is fine). Build process is CPU-intensive and may cause the internal 90C temperature threshold to be exceeded - keep the HiKey cool during the build.
977
Ian Lance Taylor1385efb2015-07-31 10:42:17 -0700978As mentioned above, use bootstrap.sh (e.g. on Ubuntu AMD64) for ARM64, then transfer over the bootstrap tbx file, untar it, and use it as GOROOT_BOOTSTRAP. Check out the Go sources into a separate GOROOT, and build.
979
Jason Bubereld8d72c92015-09-07 15:58:27 -0700980_--Andrew Cencini_ (andrew@vapor.io)
Laurent Debackerbc5a2312015-09-10 13:26:23 +0200981
982## Scaleway C1 Server
983
984Architecture: armv7l
985
986Operating System: Debian 8.2 (armhf)
987
988Go Version: 1.5
989
990The Scaleway C1 Server is a dedicated ARM server with 2GiB RAM using a SAN for storage.
991
992I used the following guide: [Building Go 1.5 on the Raspberry Pi](http://dave.cheney.net/2015/09/04/building-go-1-5-on-the-raspberry-pi)
Laurent Debacker71908792015-09-10 13:27:13 +0200993
Hilmar Lapp2b1d5312016-01-14 19:26:38 -0500994_--Laurent Debacker