neuropercolation/performance.txt
Richard Feistenauer 3e3af78ccd refactoring
2019-02-17 08:19:05 +01:00

33 lines
885 B
Plaintext

# ~Goal
def time_test(s, l):
first = time.time()
for i in range(100000):
s = l[i % 2]
last = time.time()
print((last-first)/100000)
time_test(1, [2, 1])
1.401543617248535e-07
heist auf einem processor ohne synchronized müsste ich ca 10 mal schneller sein? oder 3.3 mal weil 3 prozesse weniger?
# With 100x100 10 times
Try One
TOTAL TIME: 0.1217s
SIZE: 21.7525MB
TOTAL TIME: 0.1171s # Only set on change
SIZE: 21.7525MB # process size 51,4 / main(75,9)
TOTAL TIME: 0.1161s
SIZE: 20.3338MB # removed grid
TOTAL TIME: 0.1792s # probably wrong calculated (asizeof was in there)
SIZE: 20.2575MB # Factory instead of grid
TOTAL TIME: 0.1152s # dict instead of list for cells
SIZE: 20.2575MB # process size 53 / 75,8
TOTAL TIME: 0.1135s # evolve is static
SIZE: 20.2575MB # process size 50.8 / 76 (no more cell objects in processes)