in reply to Re^4: Initializing iterations while benchmarking
in thread Initializing iterations while benchmarking
As setting pos takes time that will not be required in the real code, it introduces an error in the benchmark results.
But pos is actually needed in real code in this case, as proven in strange behavior of grep with global match [resolved], isn't it?
Then we are back to the possibility that time to initialize obscures the differences in the code under test.
It seems that Benchmark isn't fit for the job, you may need a profiler to mark where you want to start and end mesuring. I have little experience in profilers, so I can't suggest anything at the moment.