gitee.com/quant1x/num@v0.3.2/asm/c2goasm/test/benchmark_test.go (about) 1 package c2goasmtest 2 3 import ( 4 "testing" 5 ) 6 7 func BenchmarkMultiplyAndAdd(b *testing.B) { 8 9 f1 := [8]float32{} 10 f2 := [8]float32{} 11 f3 := [8]float32{} 12 13 for i := 0; i < 8; i++ { 14 f1[i] = float32(i) 15 f2[i] = float32(i * 2) 16 f3[i] = float32(i * 3) 17 } 18 19 for i := 0; i < b.N; i++ { 20 MultiplyAndAdd(&f1, &f2, &f3) 21 } 22 }