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/os_linux_novdso.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/os_linux_novdso.go')
-rw-r--r-- | src/runtime/os_linux_novdso.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/runtime/os_linux_novdso.go b/src/runtime/os_linux_novdso.go new file mode 100644 index 0000000000..41acd957cf --- /dev/null +++ b/src/runtime/os_linux_novdso.go @@ -0,0 +1,10 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !386,!amd64,!arm + +package runtime + +func vdsoauxv(tag, val uintptr) { +} |