1# Array operation 2# Type: bytearray, inplace operation using for. What's good about this 3# method is that it doesn't require any extra memory allocation. 4import bench 5 6 7def test(num): 8 for i in iter(range(num // 10000)): 9 arr = bytearray(b"\0" * 1000) 10 for i in range(len(arr)): 11 arr[i] += 1 12 13 14bench.run(test) 15