package atree

import (
	"hash/crc32"
	"testing"
)

var page = make([]byte, 4096)
var ieeeTable = crc32.MakeTable(crc32.IEEE)

func BenchmarkCRC32C(b *testing.B) {
	for i := 0; i < b.N; i++ {
		crc32.Checksum(page, castagnoliTable)
	}
}

func BenchmarkCRC32IEEE(b *testing.B) {
	for i := 0; i < b.N; i++ {
		crc32.Checksum(page, ieeeTable)
	}
}
