Question: Question: In Python Develop a Memory benchmark (reference time: 100 seconds) o Read from 510**9 different array elements, 4 bytes each time o Write to
Question:
In Python Develop a Memory benchmark (reference time: 100 seconds)
o Read from 510**9 different array elements, 4 bytes each time
o Write to 510**9 different array elements, 4 bytes each time
-----------------------------------
code not functioning:
import time
start_time = time.time()
# memory operation my_arr = [0] * (5*10**9) for i in range(5*10**9): my_arr[i] = i x = my_arr[i] end_time = time.time()
execution_time = end_time - start_time
print("Execution time: ", execution_time)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
