Need For Speedy Graphics...

Started by
13 comments, last by SomePerson 20 years, 9 months ago
Well i was just wondering if it did make a difference... So what you guys are saying is don''t worry about the app cycles but worry about what formulas and stuff i use to render OGL?

And again i am not optimizing yet i am still getting ideas on what to opt. so when i finish the first run through of my program.

Advertisement
quote:Original post by SomePerson
Well i was just wondering if it did make a difference...

Sometimes it does, sometimes it does not. It depends on your compiler, on code context, the length of the case or if/else cascade is, the nature of the conditional expression, etc. Things like this can be optimized, but only if you know exactly what you are doing.

Don''t take that as an offense, but the fact that you asked that question, shows that you are not ready to think about such otimization yet. Don''t worry about it right now, get some experience first. And eventually, you''ll instinctively see where an if() is more appropriate than a switch(), and vice versa. Both from a semantical, as well as from a performance POV. Same thing is valid for all C/C++ specific optimizations (avoiding unnecessary copy-ctors , return optimizations, avoiding temporaries, etc). It''s all about experience, and about how well you know the subtilities of the language.

quote:
So what you guys are saying is don''t worry about the app cycles but worry about what formulas and stuff i use to render OGL?

Exactly. That should be your primary concern right now.
Thanks to all who helped...
you''ll also find that if you worry about optimizing too soon you don''t notice the cases where the code block you''re playing with doesnt even need to be called...in other words the efficiency of your algorithm as a whole is worth spending more time on than than trying to squeeze that extra 2% out of exisiting code

james
i know i am new at this, and maybe a little incompetent, but i noticed, that using loops, for things, are way faster, especially for things like drawing things over and over again(use a display list as well, for extra optimization)

just my experience

This topic is closed to new replies.

Advertisement