Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Microsoft's STL implementation slow? - 2

Sign in to follow this  


Thanks everyone, I've received a lot of helpful comments and I was able to solve the problem.

Apparently, regardless of whether you're in release mode or not, Microsoft's vectors do some 'other' stuff in the background.

So, in order to fix this issue you have to use these pre-processor definitions:

#define _SECURE_SCL 0

I still think it's a bit silly that they assume you want iterator checking, etc on but w/e.
Sign in to follow this  

1 Comment

Recommended Comments

Yeah, I agree. I'd far rather have it controlled by the _DEBUG define. I was under the impression that this is why we have a std::vector<>::at() method as well as an operator[].

It's also a pain if you are writing libs, since I'd assume all the different parts of a solution have to be compiled with the same flags to prevent stuff exploding.

I guess it's to do with Microsoft encouraging more security-robust code.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!