Skip to content

Instantly share code, notes, and snippets.

@jcdickinson
Created May 27, 2012 06:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcdickinson/2802386 to your computer and use it in GitHub Desktop.
Save jcdickinson/2802386 to your computer and use it in GitHub Desktop.
Release vs. Debug Jitter Optimizations
class Program
{
static void Main(string[] args)
{
// Run this WITHOUT a debugger attached (CTRL+F5)
// and inspect the stack traces in RELEASE and DEBUG.
try
{
Simple1();
}
catch (Exception ex)
{
Console.WriteLine(ex.StackTrace);
}
Console.ReadLine();
}
private static void Simple1()
{
Simple2();
}
private static void Simple2()
{
Simple3();
}
private static void Simple3()
{
throw new NotImplementedException();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment