This commit is contained in:
2026-02-23 19:37:05 +00:00
parent 6011535509
commit 271046231c
15 changed files with 948 additions and 816 deletions

21
atree/io_test.go Normal file
View 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)
}
}