delve/_fixtures/traceperf.go
Alessandro Arzilli 098457e59e Trace optimizations (#695)
* proc: Added trace benchmark

Results:

BenchmarkTrace-4   	    5000	  36195899 ns/op

* proc/linux: faster single step implementation.

BenchmarkTrace-4   	    5000	   2093271 ns/op

* proc: Cache function debug_info entries to speed up variable lookup.

BenchmarkTrace-4   	    5000	   1864846 ns/op

* proc/variables: Optimize FunctionArguments by prefetching frame

BenchmarkTrace-4   	    5000	   1815795 ns/op

* proc/variables: optimized parseG

BenchmarkTrace-4   	   10000	    712767 ns/op
2017-02-07 13:08:11 -08:00

19 lines
202 B
Go

package main
func PerfCheck(i, a, b, c int) {
x := a - b - c
_ = x
}
func main() {
a := 1
b := 1
c := 1
for i := 0; true; i++ {
a = a * 2
b = -b + i
c = i * b
PerfCheck(i, a, b, c)
}
}