Class access speed?
I''m windering about speed issues. Let''s say I have a polygon struct or class with NumPoints as a var.
now I wanna go through a for loop to draw then all out and I do
for(i=0; iNumPoints; i++)
{
PlotPoint(Poly->Points.x, Poly->Points.y, Poly->color);
}
I''m wonering if all this array and structure access are slower than say doing:
int NumP = Poly->NumPoints
for(i=0; i<NumP; i++)
or is there no difference?
</i>
ββββββββββ
fclose(fp)
ββββββββββ
ByteMe95::~ByteMe95()My S(h)ite
(If you want to see what Byteme really wrote, edit hist post).
I don''t think you''ll notice the difference, even if there is one.
If that code is slowing you down, you can probably make it faster by optimizing the PlotPoint function instead of the for loop
- Muzzafarath
Mad House Software
The Field Marshals
I don''t think you''ll notice the difference, even if there is one.
If that code is slowing you down, you can probably make it faster by optimizing the PlotPoint function instead of the for loop
- Muzzafarath
Mad House Software
The Field Marshals
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement