Skip to content

Commit 0e700c2

Browse files
committed
simplify new benchmark
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
1 parent 659bc04 commit 0e700c2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/reflect/all_test.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -1944,17 +1944,13 @@ func BenchmarkCall(b *testing.B) {
19441944

19451945
type myint int64
19461946

1947-
type inccer interface {
1948-
inc()
1949-
}
1950-
19511947
func (i *myint) inc() {
19521948
*i = *i + 1
19531949
}
19541950

19551951
func BenchmarkCallMethod(b *testing.B) {
19561952
b.ReportAllocs()
1957-
z := inccer(new(myint))
1953+
z := new(myint)
19581954

19591955
v := ValueOf(z.inc)
19601956
for i := 0; i < b.N; i++ {

0 commit comments

Comments
 (0)