mirror of
https://github.com/bloeys/gglm.git
synced 2025-12-29 13:38:20 +00:00
28 lines
339 B
Go
Executable File
28 lines
339 B
Go
Executable File
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/bloeys/gglm/gglm"
|
|
)
|
|
|
|
func BenchmarkVec3Add(b *testing.B) {
|
|
|
|
v1 := gglm.NewMat3Id()
|
|
v2 := gglm.NewMat3Id()
|
|
|
|
for i := 0; i < b.N; i++ {
|
|
v1.Mul(v2)
|
|
}
|
|
}
|
|
|
|
func BenchmarkVec3Add2(b *testing.B) {
|
|
|
|
v1 := gglm.NewMat3Id()
|
|
v2 := gglm.NewMat3Id()
|
|
|
|
for i := 0; i < b.N; i++ {
|
|
v1.Mul(v2)
|
|
}
|
|
}
|