Skip to content

Commit

Permalink
Benchmarks for Labels.
Browse files Browse the repository at this point in the history
  • Loading branch information
markkurossi committed Jan 27, 2022
1 parent 30054b5 commit e257e80
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion ot/label_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// label_test.go
//
// Copyright (c) 2019 Markku Rossi
// Copyright (c) 2019-2022 Markku Rossi
//
// All rights reserved.
//
Expand All @@ -12,6 +12,30 @@ import (
"testing"
)

func BenchmarkLabelMul2(b *testing.B) {
var l Label

for i := 0; i < b.N; i++ {
l.Mul2()
}
}

func BenchmarkLabelMul4(b *testing.B) {
var l Label

for i := 0; i < b.N; i++ {
l.Mul4()
}
}

func BenchmarkLabelXor(b *testing.B) {
var l0, l1 Label

for i := 0; i < b.N; i++ {
l0.Xor(l1)
}
}

func TestLabel(t *testing.T) {
label := &Label{
d0: 0xffffffffffffffff,
Expand Down

0 comments on commit e257e80

Please sign in to comment.