Jump to content

  • Log In with Google      Sign In   
  • Create Account

Anon Mike

Member Since 07 Feb 2001
Offline Last Active Oct 24 2012 06:07 PM

#4991891 Visual Studio can't debug performance bottleneck

Posted by on 19 October 2012 - 01:47 PM

This is actually a Windows internal thing, not VC specifically. If a process starts up with a debugger attached then the Windows heap manager will put itself into debug mode.

To work around it, start your app without debugging (ctrl-F5) and then attach VC to the process after it starts.

#4873968 Visual Studio 2008: 'W' is for WTF?

Posted by on 18 October 2011 - 10:20 AM

They didn't consider the consequences of their decision hard enough at the time.

at the time, the dominant language was C, not C++, so function overloading wasn't an option. They could have just made everyone call the W version directly, but then people would have whined about how dumb all the API names were (like you sometimes see for the unicode C-runtime functions, e.g. wcslen). Plus Microsoft was already fighting an uphill battle to get people to accept that Unicode was a good thing rather than a waste of memory (ASCII should be good enough for anybody!) And even the people who were willing to accept Unicode didn't want to have to go through their entire program changing function names - porting to NT (from Win16) was enough work already. Plus if they did that then it wouldn't compile for 16-bit anymore and that was where the real market was.

The macros were a perfectly reasonable compromise at the time. It is unfortunate that they don't provide a way to use overloading instead of macros for C++ nowadays, but I imagine there's little real benefit and it would very likely increase compile times in addition to making the headers simply bigger.