Descriptionruntime: use vDSO clock_gettime for time.now & runtime.nanotime on Linux/amd64
Performance improvement aside, time.Now() now gets real nanosecond resolution
on supported systems.
Benchmark done on Core i7-2600 @ 3.40GHz with kernel 3.5.2-gentoo.
original vDSO gettimeofday:
BenchmarkNow 100000000 27.4 ns/op
new vDSO gettimeofday fallback:
BenchmarkNow 100000000 27.6 ns/op
new vDSO clock_gettime:
BenchmarkNow 100000000 24.4 ns/op
Patch Set 1 #Patch Set 2 : diff -r e3d1b93bfa09 https://code.google.com/p/go #Patch Set 3 : diff -r f4796b726694 https://code.google.com/p/go/ #
MessagesTotal messages: 8
|