Commit 024a92c1 authored by Anthony Martin's avatar Anthony Martin

runtime: use vDSO for gettimeofday on linux/amd64

Intel Core 2 Duo (2.16 GHz) running 3.6.5-1-ARCH

benchmark       old ns/op    new ns/op    delta
BenchmarkNow         1856         1034  -44.29%

R=rsc
CC=golang-dev
https://golang.org/cl/6826072
parent 122c154c
...@@ -104,7 +104,7 @@ TEXT runtime·mincore(SB),7,$0-24 ...@@ -104,7 +104,7 @@ TEXT runtime·mincore(SB),7,$0-24
TEXT time·now(SB), 7, $32 TEXT time·now(SB), 7, $32
LEAQ 8(SP), DI LEAQ 8(SP), DI
MOVQ $0, SI MOVQ $0, SI
MOVQ $0xffffffffff600000, AX MOVQ runtime·__vdso_gettimeofday_sym(SB), AX
CALL AX CALL AX
MOVQ 8(SP), AX // sec MOVQ 8(SP), AX // sec
MOVL 16(SP), DX // usec MOVL 16(SP), DX // usec
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment