1
0
mirror of https://github.com/golang/go synced 2024-11-14 15:10:54 -07:00
go/src/cmd
Ben Shi 69261ecad6 runtime: use hardware divider to improve performance
The hardware divider is an optional component of ARMv7. This patch
detects whether it is available in runtime and use it or not.

1. The hardware divider is detected at startup and a flag is set/clear
   according to a perticular bit of runtime.hwcap.
2. Each call of runtime.udiv will check this flag and decide if
   use the hardware division instruction.

A rough test shows the performance improves 40-50% for ARMv7. And
the compatibility of ARMv5/v6 is not broken.

fixes #19118

Change-Id: Ic586bc9659ebc169553ca2004d2bdb721df823ac
Reviewed-on: https://go-review.googlesource.com/37496
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2017-04-11 12:25:55 +00:00
..
addr2line cmd/go: build test binaries with -s in addition to -w 2017-03-29 17:18:16 +00:00
api
asm runtime: use hardware divider to improve performance 2017-04-11 12:25:55 +00:00
cgo cmd/cgo: support floating point #define macros 2017-04-07 21:09:44 +00:00
compile cmd/compile/internal/ssa: remove unused Typ fields 2017-04-11 06:18:36 +00:00
cover
dist cmd/go: allow full flag processing in go vet 2017-04-10 15:10:30 +00:00
doc cmd/doc: implement "go doc struct.field" 2017-03-22 05:37:50 +00:00
fix cmd/fix,cmd/gofmt: flush to disk before diffing 2017-03-30 18:19:57 +00:00
go cmd/go: allow full flag processing in go vet 2017-04-10 15:10:30 +00:00
gofmt cmd/fix,cmd/gofmt: flush to disk before diffing 2017-03-30 18:19:57 +00:00
internal runtime: use hardware divider to improve performance 2017-04-11 12:25:55 +00:00
link Revert "cmd/compile: output DWARF lexical blocks for local variables" 2017-04-07 19:52:26 +00:00
nm
objdump cmd/objdump: print Go code alongside assembly 2017-04-05 06:20:40 +00:00
pack
pprof cmd/pprof: update README to explain relationship with github.com/google/pprof 2017-04-10 19:51:01 +00:00
trace
vendor
vet cmd/go: allow full flag processing in go vet 2017-04-10 15:10:30 +00:00