upvote
> prevent out-of-order execution

Won't this make the results inaccurate?

reply
You just want to prevent the CPU from capturing the end time before it has finished the benchmarking code. Or prevent it from running benchmark code before it has captured the start time.
reply