diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2018-03-02 11:27:15 +0100 |
---|---|---|
committer | Tobias Klauser <tobias.klauser@gmail.com> | 2018-03-03 12:12:58 +0000 |
commit | 51b027116c2c90e7cb938362b0134ff710fea54e (patch) | |
tree | 773d74d9a111aea28051bb7ef218675d44fce97e /src/runtime/vdso_linux.go | |
parent | c69f60d0715a836b739b34a92a56c1f7d29485a6 (diff) | |
download | go-51b027116c2c90e7cb938362b0134ff710fea54e.tar.gz go-51b027116c2c90e7cb938362b0134ff710fea54e.zip |
runtime: use vDSO for clock_gettime on linux/arm
Use the __vdso_clock_gettime fast path via the vDSO on linux/arm to
speed up nanotime and walltime. This results in the following
performance improvement for time.Now on a RaspberryPi 3 (running
32bit Raspbian, i.e. GOOS=linux/GOARCH=arm):
name old time/op new time/op delta
TimeNow 0.99µs ± 0% 0.39µs ± 1% -60.74% (p=0.000 n=12+20)
Change-Id: I3598278a6c88d7f6a6ce66c56b9d25f9dd2f4c9a
Reviewed-on: https://go-review.googlesource.com/98095
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/vdso_linux.go')
-rw-r--r-- | src/runtime/vdso_linux.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/vdso_linux.go b/src/runtime/vdso_linux.go index 61872e3b27..46b92869ab 100644 --- a/src/runtime/vdso_linux.go +++ b/src/runtime/vdso_linux.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // +build linux -// +build 386 amd64 +// +build 386 amd64 arm package runtime @@ -264,7 +264,7 @@ func vdso_parse_symbols(info *vdso_info, version int32) { } } -func archauxv(tag, val uintptr) { +func vdsoauxv(tag, val uintptr) { switch tag { case _AT_SYSINFO_EHDR: if val == 0 { |