Currently the benchmark shown there doesn't assign the return value of Repeat anywhere. This means that it could get optimized away and we'd get useless benchmark results.
There should be at least warning about this or the example should be modified so that such optimization cannot happen. Here is an example how this can apparently be done.
Currently the benchmark shown there doesn't assign the return value of
Repeat
anywhere. This means that it could get optimized away and we'd get useless benchmark results.There should be at least warning about this or the example should be modified so that such optimization cannot happen. Here is an example how this can apparently be done.