#156942 - Polaris - Fri May 16, 2008 5:28 pm
I'm looking at comon stuff such as lists, stacks and queus.
Are the STL implementations of these good, performance-wise, for a DS project?
From what I have been reading it wouldn't be too far fetched to think I could write better implementations for my specific needs. But is it really worth it? Or would I just be coding for a minimum performance gain?
#156943 - Miked0801 - Fri May 16, 2008 5:54 pm
STL works fine as long as you understand where to use the stuff and the hidden memory overheads associated with it. Personally, I would have a hard time going back to non-STL DS development at this point :)
#156944 - keldon - Fri May 16, 2008 5:56 pm
That answer depends on this question: does, would, or should performance loss occur from using STL in your code?
Answering such a question may not be easy, but how you are using STL will help you in answering that question. For example, are you using it for dynamic allocation regularly to build data structures in deep nested calls?
Do you know O() notation? If so does your use look like it could pose a performance loss.
You can of course design your code so that you can switch from STL to your own implementation.
#156945 - Polaris - Fri May 16, 2008 6:35 pm
I haven't done anything with STL on the DS yet, so I don't know if my use of it will make things go slow.
I'm just looking for some input in the subject because I really don't like wasting time re-inventing the wheel. Unless of course, the existing wheel is more like a brick, but that doesn't seem to be the case here.
What is O() notation?
#156948 - sajiimori - Fri May 16, 2008 7:06 pm
Use STL to get up and running quickly. Implement your own containers over time, as necessary. I shipped my first full 3D DS game without replacing any STL containers.