in reply to Re^5: Initializing iterations while benchmarking
in thread Initializing iterations while benchmarking

In the case I was looking at, each string would be tested only once, so no need to set pos before the test. It only became an issue when the same test was performed on the same string as the benchmark test iterated.

The broader issue of excluding setup time from the benchmark results is what interests me here. This example is merely what I was looking at when I began to consider the issue. It is a concrete example but otherwise not important in itself.

Thanks for sharing your thoughts.

update: revised/clarified (I hope) the first paragraph.

  • Comment on Re^6: Initializing iterations while benchmarking