you ignored my question, why C++ people care so much for efficiency?
i bet you don't have templates on embedded systems compilers.
then what's the point? different platforms can have differently optimized c++.
you ignored my question, why C++ people care so much for efficiency?
i bet you don't have templates on embedded systems compilers.
then what's the point? different platforms can have differently optimized c++.
The compiler for embedded systems should be fully C++ compliant - certainly the one we use is. We choose to not use templates (much) due to the fact that they often produce quite inefficient and often lead duplicated code in many places (because every time you include the template in one project, it gets a complete set of all the template code compiled into that source file).
But even for PC's there is code that needs to be efficient - your code may not belong in that category, but certainly game developers will "care" if the frame-rate is high or not, and inefficient code will not give good frame-rate.
Likewise, if you are working on a large database-project or some such (e.g you implement the functions in MySQL or some such), any extra time spent there should be avoided.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
but you certainly avoid such stuff, mainly, because of scarce resources and, mostly because of little need of over complicating the stuff
they go far beyond what can be expected, they use inline assembly, then gfx cards help, then a library using all the hardware features etc. etc. some even avoid C++.But even for PC's there is code that needs to be efficient - your code may not belong in that category, but certainly game developers will "care" if the frame-rate is high or not, and inefficient code will not give good frame-rate.
if i am doing such a big stuff then std stuff is negligible compared to my large implementation, i will re write the stuff i need, the way i want it!Likewise, if you are working on a large database-project or some such (e.g you implement the functions in MySQL or some such), any extra time spent there should be avoided.
Template-avoidance is a combination of "trying to get everything to fit in memory" and "don't help much anyways", yes. We have a "budget" of 32MB to fit "everything" into memory - that's OS, drivers, apps, data and anything else needed in our system. If it doesn't fit in 32MB, then it's time to "go on a diet".
I very much doubt you can find any game that "avoid C++" - they may well not use for example STL, but the code for current games is almost certainly written using C++ - it makes the code so much neater when doing vector operations for example, and using macros/functions for vector operations would just make the code unreadable and slower. But the game programmers certainly care about what happens "under the hood".
Rewriting "anything I need" is not a good philosophy, although sometimes it's necessary to write your own functions to do things - but it should not be done "because it's such a large system", but because there is a CLEAR AND REAL need to write your own functions.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.