The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Timing your C# code

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eric Gunnerson

Posts: 1006
Nickname: ericgu
Registered: Aug, 2003

Eric Gunnerson is a program manager on the Visual C# team
Timing your C# code Posted: Mar 18, 2004 3:19 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Eric Gunnerson.
Original Post: Timing your C# code
Feed Title: Eric Gunnerson's C# Compendium
Feed URL: /msdnerror.htm?aspxerrorpath=/ericgu/Rss.aspx
Feed Description: Eric comments on C#, programming and dotnet in general, and the aerodynamic characteristics of the red-nosed flying squirrel of the Lesser Antilles
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Eric Gunnerson
Latest Posts From Eric Gunnerson's C# Compendium

Advertisement

I've gotten a couple of emails on my recent column telling me that they couldn't replicate my timings.

My first reaction was a sinking feeling in my stomach that I'd messed up the timings, but then a more rational idea occurred to me.

They were running from inside the IDE.

You see, whenever you do an F5 from inside the IDE, the IDE figures that you want to be able to debug your code, and therefore the JIT is put into debug mode, and you don't get the fully optimized path.

This happens even if you are building in a release comparison.

IIRC, if you do a CTRL-F5, you don't get this behavior, but it's generally a better idea to do any timings outside the IDE, as the IDE may have other impact on your timings.

Read: Timing your C# code

Topic: Eric Gunnerson just keep pumping out the cool posts... Previous Topic   Next Topic Topic: Who does Microsoft talk to when they have questions?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use