• Tobias Klauser's avatar
    runtime: use vDSO for clock_gettime on linux/arm · 51b02711
    Tobias Klauser authored
    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/98095Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    51b02711
vdso_elf32.go 2.76 KB