Quote:
3) Don't really erase elements. Instead, mark them as erased. Re-use the storage by searching for an erased bullet first. Because of the way aging of bullets work, keep the index of the last insertion and start your search from there; you'll get amortized constant time insertions despite the linear search for a free space, while making erasures constant-time, too.
This is some excellent advice that has gained me numerous cycles and frames time and time again. As long as you keep track of the last bullet erased and then use that index on the next allocation you can really get some huge speed gains. You are essentially using each index in the vector as a 'slot' for 1 bullet.