On Sat, 24 May 2008 17:55:33 -0700, John A Grandy
<johnagrandy@g-mail-dot-comwrote:
How can I use a profiler ( e.g. RedGate ANTS Profiler ) to breakdown
relative performance of method calls inside giant iterations ? ( i.e.
implement 3 different algorithms and/or coding techniques and see which
one is taking the least time on avg per iteration )
I admit, I cannot advise you on the use of any specific profiler. It's
been many years since I needed to do intensive profiling work, and surely
the tools have changed a lot since then.
But I'm sure they still offer the same basic options: sampling vs.
instrumented, and using either method they will report things like
percentage and actual time spent in a specific method. This information
will allow you to see whether in fact improving the speed of the
String.Replace() method would help your program run faster.
When I need to measure the speed of things today, it's usually pretty
simply stuff, and I just use the Stopwatch class to find out how much time
specific sections of my code are taking.
Pete