All Benchmarks
Go Benchmark
Interface vs Direct Method Call
Measure the overhead of calling a method through an interface instead of on the concrete type.
interfacestruct
This benchmark compares the performance of interface vs direct method calls in Go. Each benchmark creates a struct, containing a single method. It will then call the method on the struct, either directly or via an interface.
Compare atCPUs
1 CPU
32 CPUs
Performance Comparison (lower is better)
CPU:
This benchmark calls the method on the struct via an interface.
CPU Scaling (lower is better)
This benchmark calls the method on the struct directly.
CPU Scaling (lower is better)
Contributors