wp
This commit is contained in:
21
atree/io_test.go
Normal file
21
atree/io_test.go
Normal file
@@ -0,0 +1,21 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user