• Dmitriy Vyukov's avatar
    runtime: refactor Syscall benchmark · 38d4d3c6
    Dmitriy Vyukov authored
    And add a benchmark where #goroutines>GOMAXPROCS,
    because it's the most interesting case.
    Current results on darwin/amd64, Intel Core 2 Duo 2.13 GHz, 2 cores:
    BenchmarkSyscall	100000000	        56.0 ns/op
    BenchmarkSyscall-2	50000000	        57.2 ns/op
    BenchmarkSyscallWork	10000000	       635 ns/op
    BenchmarkSyscallWork-2	10000000	       315 ns/op
    BenchmarkSyscallExcess	 1000000	      2698 ns/op
    BenchmarkSyscallExcess-2	 5000000	      1192 ns/op
    BenchmarkSyscallExcessWork	 1000000	      2832 ns/op
    BenchmarkSyscallExcessWork-2	 2000000	      1966 ns/op
    
    R=golang-dev, r
    CC=golang-dev
    https://golang.org/cl/7415044
    38d4d3c6
proc_test.go 5.49 KB