Hey all!
I've got issues with the performance (as in, time taken) of the compilation of a relatively simply loop (DX9):
for (int i=0; i < pointsnum; i++)
{
Color.rgb = samplepoint(OrigColor, Color, uv, ov, points[i].xy, points[i].z);
Color.rgb = samplepoint(OrigColor, Color, uv, ov, float2(points[i].y,points[i].x), points[i].z);
}
I will save the details here. Basically the compiler takes constantly around 2.7 seconds with 18 iterations, but 7.8 seconds with 36. I would have suspected compilation time to increase linearly with the number of iterations, so should be about twice the time when doubling iterations
Does the complexity of the called samplepoint function (which has calls to subsequent custom functions as well) affect compilation performance this much, or why does the compiler need that much more time for just twice the iterations count?
Edit:
If I disable one of the two lines in the loop (doesn't matter which one), compilation time is the same as if using 18 instead of 36 iterations for both lines.
If I make two loops each with one of the two lines instead just one loop, compilation time is the same as with only one loop.
So it's definitively a compilation issue, not one of my code in particular!
Any hints would be appreciated.