neuropercolation/performance.txt

36 lines
945 B
Plaintext
Raw Normal View History

2019-02-10 10:00:57 +00:00
# ~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
2019-02-09 17:16:19 +00:00
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
2019-02-09 18:06:18 +00:00
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)
TOTAL TIME: 0.1126s # fixed changed state
SIZE: 20.8678MB