generated from pancake-llc/package
-
Notifications
You must be signed in to change notification settings - Fork 16
Benchmark Vector Multiplication
Aprius edited this page Nov 1, 2024
·
1 revision
Vector3[] input = new Vector3[1000];
... // init vector input to test
Vector3[] DefaultVectorMultiplication()
{
Vector3[] results = new Vector3[1000];
for (int i = 0; i < 1000; i++)
{
results[i] = input[i] * 5f;
}
return results;
}
Vector3[] input = new Vector3[1000];
... // init vector input to test
Vector3[] DefaultVectorMultiplication()
{
Vector3[] results = new Vector3[1000];
for (int i = 0; i < 1000; i++)
{
Vector3 curr = input[i];
Vector3 result;
result.x = curr.x * 5f;
result.y = curr.y * 5f;
result.z = curr.z * 5f;
results[i] = result;
}
return results;
}