Programming with Macros, great. What a mess. It's okay if you live in a pig sty. Some programmers rise above that though. Personally I don't think that Macros can accomplish what the STL can. It sounds like thin ice to me.
Programming with Macros, great. What a mess. It's okay if you live in a pig sty. Some programmers rise above that though. Personally I don't think that Macros can accomplish what the STL can. It sounds like thin ice to me.
Last edited by Troll_King; 08-16-2002 at 01:09 AM.
I don't pretend that I can write more efficient classes than the STL offers, that's why I use the STL.Originally posted by swoopy
>The thing that I find weird is that they think that their own libraries are more efficient than the STL. I have never seen anyone on this board who I believe is capable of this.
What about you ? You might be capable.
If all you need out of a container is the properties of a uni-directional linked list I would imagine a fair proportion of the people here could out-perform the (current) STL. However, if you need a generic set of containers that provide all of the functionality of the STL I doubt there's many (if any) that could.
What's the moral of the story?
Oh hell, I've forgotten.
If you need a uni-directional linked list than use a vector sequential container.
If you needed the properties of a uni-directional list, std::vector would give you worse performance than std::list. Any array type container is going to have pretty horrendous insertion/deletion performance (comparatively speaking).
The Vector is strong if you just want to append values but not so good for instertion/deletion other than at the end because it invalidates the iterators that follow the instertion/deletion. The vector is better at randomly accessing values however. You just have to know the right container to use. These are sequential containers, there are also associative containers, which again have different strengths. I can see someone having performance problems with the STL if they are not using it properly, but not otherwise.
I think it would be extremely helpful for peopl just getting into STL if those who are knowledgable dealing with it were to put their heads together and come up with a list of the libraries that they find most usefull, and what they are usefull for.
...it may be good faq board content.
Probably is if you are doing some of the stuft with vector whichWhat make you people to jump to a conclusion that C++ programmers have never tried on using STL? It needs to be fair without bias and conservative when discussing about a programming language. For many years in software development, I have found that C++ STL is much slower than C macros, especially for develope the real-time apps. I totally agree with DV007 that STL is slow in speed such as real-time server, mission-critical embedded software....ect
could have easily done with just a dynamic array or a regular
array. But if you need the functionality then use it. Another thing is that you have to enable full optimizations.
Mine uses the SDL. What you want to do is profile. I found out that most of the time was spend in drawing the entire tile background each frame using SDL_BlitSurface. But since SDL_BlitSurface uses clipping I was able to make drawingWindows and the STL are not mutually exclusive. My game (see sig) runs in windows and uses the STL quite a bit.
the tiles faster by using SDL_LowerBlit.