Before I start I want to state here and now that there is no substitute to using an actual profiling application that will can find performance bottlenecks and problematic code , but if you have a small piece of code that needs profiling …
Read more here:
Poor developer's performance profiler – Helper Code