diff --git a/pkg/vm/ref_counter_test.go b/pkg/vm/ref_counter_test.go index f0e63b318..8da020671 100644 --- a/pkg/vm/ref_counter_test.go +++ b/pkg/vm/ref_counter_test.go @@ -55,3 +55,14 @@ func BenchmarkRefCounter_Add(b *testing.B) { rc.Add(a) } } + +func BenchmarkRefCounter_AddRemove(b *testing.B) { + a := stackitem.NewArray([]stackitem.Item{}) + rc := newRefCounter() + + b.ResetTimer() + for i := 0; i < b.N; i++ { + rc.Add(a) + rc.Remove(a) + } +}