exported sink var to avoid compiler optimizations in benchmarks
(b *testing.B)
| 135 | var SinkInt int // exported sink var to avoid compiler optimizations in benchmarks |
| 136 | |
| 137 | func BenchmarkDiffCommonSuffix(b *testing.B) { |
| 138 | s := "ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖ" |
| 139 | |
| 140 | dmp := New() |
| 141 | |
| 142 | b.ResetTimer() |
| 143 | |
| 144 | for i := 0; i < b.N; i++ { |
| 145 | SinkInt = dmp.DiffCommonSuffix(s, s) |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | func BenchmarkCommonLength(b *testing.B) { |
| 150 | data := []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…