in reply to Re^3: Fast sliding submatrix sums with PDL (inspired by PWC 248 task 2)
in thread Fast sliding submatrix sums with PDL (inspired by PWC 248 task 2)
Oops, sorry, one more: subtraction is not required of course, and, more importantly, next gen calculation expression can be split in 2 lines -- same 4 ops but presumably done in-place i.e. faster:
$m &= $n == 4; $m |= $n == 3; __END__ Game of Life! Matrix: PDL: Long D [2000,2000], 10 generations Faster+: 0.677 s
|
---|