Not resetting
StopWatch
is not the only mistake.
One much more general thing is: you should move JIT time out of the equation. I also should note that your repetition time is very low, so the JIT compilation of the method will be a serious factor. The method is usually JIT-compiled before you call it for the first time; and the compilation time is way greater then the call itself.
This is the correct way:
class A {
internal void doSth() { }
}
A myInstance = new A();
myInstance.doSth();
That's it. Now it will work correctly.
—SA