(b *testing.B)
| 15 | } |
| 16 | |
| 17 | func BenchmarkAddMul(b *testing.B) { |
| 18 | x, y := Vec3{1, 2, 3}, Vec3{5, 6, 7} |
| 19 | for i := 0; i < b.N; i++ { |
| 20 | x = x.Add(y.Mul(0.15)) |
| 21 | } |
| 22 | runtime.KeepAlive(x) |
| 23 | runtime.KeepAlive(y) |
| 24 | } |
| 25 | |
| 26 | func BenchmarkAddMulFused(b *testing.B) { |
| 27 | x, y := Vec3{1, 2, 3}, Vec3{5, 6, 7} |