Quote:
Picking an array based on the idea that "Its faster in debug mode!"
That is a valid point but I run in debug a lot. But regardless, it still has run faster in release for me every single time as well.
Quote:
Had you presented your original post as a question rather than as fact, we would have gone easier on you.
Fair enough. I added 'tip' in the edit after I had run it. You must have something check marked to get it to optimize vectors better than mine cuz I'm always about 3 times slower.
Quote:
First off, because no-one but the developer is going to see the debug mode. Secondly, don't optimize till it becomes a problem.
Well 26 seconds vs 1/2 second is a problem. So in a respectful way, I as the developer have a problem (26 seconds), that I as the developer see because I see debug mode :(
And I had seen some code with a 3D vector which now I know why it is very slow because it stores like 1 million things. Also the code never called the reserve function :( So, yes it does happen that people still don't reserve vectors.