Timeline for When to use an Array vs When to use a Vector, when dealing with GameObjects?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 26, 2013 at 4:55 | history | tweeted | twitter.com/#!/StackGameDev/status/349752724633567232 | ||
Jun 25, 2013 at 23:46 | comment | added | Sean Middleditch | linked lists are fine for games - just not naively heap-allocated structures like std::list. an inline (zero-allocation overhead) linked list is great if used properly. likewise, std::map and std::unordered_map can be problematic, but a well-written tree or hash table that plays nicely with memory and cache is invaluable. be wary of any advice that claims some technique is always too slow or perfectly fast - as much truth as those claims might be founded in, there's always more details you have to consider (and measure!) for each situation. | |
Jun 25, 2013 at 20:15 | history | edited | Tetrad |
edited tags
|
|
Jun 25, 2013 at 20:15 | comment | added | Tetrad |
There are times you want things to be fixed sized, and there are times you want to dynamically sized. The use cases for that determines which one you'll be using. But as an aside, you should probably be using std::array for fixed-sized arrays instead of C-arrays since they're designed for similar safety that vectors are.
|
|
Jun 25, 2013 at 20:07 | comment | added | Tetrad | related: gamedev.stackexchange.com/questions/4887/… | |
Jun 25, 2013 at 19:58 | review | First posts | |||
Jun 25, 2013 at 20:45 | |||||
Jun 25, 2013 at 19:48 | answer | added | Evan | timeline score: 5 | |
Jun 25, 2013 at 19:39 | history | asked | user1123 | CC BY-SA 3.0 |