2

I am profiling a code that uses C++11 and STL features heavily. I have many shared_ptr's and few unique_ptr's. The code is serial, however when I profile the code, RtlLeaveCriticalsection and RtlEnterCriticalsection show up as the functions doing most individual work (Exclusive sample 5% each).

My thought was these internal routines invoked only for multi-threaded applications, and if there is a way to turn it off without changing the code behavior to gain performance, I would like to be able to do so.

Any suggestions or insights are appreciated. Thanks.

Mangesh
  • 5,491
  • 5
  • 48
  • 71
user6386155
  • 825
  • 7
  • 17
  • 4
    http://stackoverflow.com/questions/15129263/is-there-a-non-atomic-equivalent-of-stdshared-ptr-and-why-isnt-there-one-in – Hans Passant May 26 '16 at 12:41

0 Answers0