Avoid integer overflow in benchmark