init: v1.0.0

This commit is contained in:
yaole
2026-05-27 23:03:00 +08:00
commit 8d97f750eb
466 changed files with 80067 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
package sm3_test
import (
"testing"
"xdx.jelly/xgcl/sm/sm3"
)
// BenchmarkBlockGeneric 性能测试
func BenchmarkBlockGeneric(b *testing.B) {
d := sm3.NewDigest()
buf := make([]byte, 10*1024*1024)
b.SetBytes(int64(len(buf)))
b.ResetTimer()
for i := 0; i < b.N; i++ {
sm3.BlockGeneric(d, buf)
}
}
// BenchmarkBlockAVX2 性能测试
func BenchmarkBlockAVX2(b *testing.B) {
d := sm3.NewDigest()
buf := make([]byte, 10*1024*1024)
b.SetBytes(int64(len(buf)))
b.ResetTimer()
for i := 0; i < b.N; i++ {
sm3.BlockAsmAVX2(d, buf)
}
}